Gas & fees
The cost of an on-chain transaction.
‘Gas’ measures the computational work a transaction asks of the network. The more complex it is (a swap vs a simple transfer), the more gas it uses - and the higher the fee, paid in the native token (ETH, etc.).
Gas price moves with congestion: it spikes when the network is busy. Layer 2s cut these fees dramatically.
- Fee = computational work
- Rises with congestion
- Reduced by Layer 2s
What an Ethereum transaction costs
Fees = gas units used × gas price. Compare a plain transfer, a swap and an NFT mint.
- 01ETH transfer21 000 × 20 gwei$1.26
- 02DEX swap150 000 × 20 gwei$9.00
- 03NFT mint100 000 × 20 gwei$6.00
- 04The same swap at 60 gwei (peak)$27.00
Cost depends on complexity and network congestion. On a $100 swap, $9 of fees is 9%: a pro batches operations, picks the time or uses a layer 2.
Questions and answers
Why do fees vary so much?
Space in each block is limited: when many users want in at once, the gas price rises.
When should I transact to pay less?
At off-peak times, often weekends, or on a layer 2 where fees are much lower.
Test your understanding with a quick interactive quiz.