Gas fees explained
Why does the same swap cost $0.50 one day and $40 the next?
Builder · 8 min · Updated 2026-11-08
💡 The taxi meter
A taxi fare = distance × price per km, plus an optional tip. On Ethereum, fee = gas used (how much computation — the distance) × gas price (the price per unit). When the whole city wants taxis at once (a busy network), the price per km surges. The tip gets your ride picked first.
The formula (post EIP-1559)
Fee = gas used × (base fee + priority fee)
- Gas used — computation consumed. A plain ETH transfer is 21,000 gas; a token swap might be 120,000–200,000.
- Base fee — set by the protocol and burned (destroyed). It rises up to 12.5% per block when blocks are more than half full, and falls when they're emptier.
- Priority fee (tip) — goes to the validator, used to jump the queue.
Units
Gas prices are quoted in gwei: 1 gwei = 0.000000001 ETH (10−9).
Why fees spike
Block space is limited. During popular NFT mints, market crashes or airdrops, many people bid for the same space and the base fee climbs block after block.
How to pay less
- Use a Layer 2 network (rollups) for small transactions — often cents.
- Transact when the network is quiet.
- Never set gas limits manually unless you understand them — a failed transaction still costs the gas used.
🧮 Practical example: a simple transfer
Key takeaways
- Fee = gas used × (base + tip).
- Base fee is burned; tip goes to validators.
- Base fee adjusts up to ±12.5% per block.
- Layer 2s cut costs for small transactions.
Education only — not financial advice.