PlainCoin
Chapter 11 Core concepts Low risk

What are gas fees?

What you pay when you use Ethereum and EVM chains — gas units, gwei, why fees spike, and how to avoid overpaying.

The short version
  • Gas is the fee for running smart contract code on-chain — you pay in the network's native token (ETH on Ethereum, ETH on most L2s).
  • Total fee ≈ gas used × gas price. Gas price is quoted in gwei (billionths of ETH).
  • Complex transactions (swaps, NFT mints, multi-step DeFi) use more gas than simple sends.
  • Fees spike when the network is congested — L2s are cheaper because they batch transactions off the main chain.

Gas is the fee you pay to execute a transaction on a blockchain. On Ethereum and EVM chains, every action — sending tokens, swapping, approving a contract — consumes gas units and costs the network’s native token.

01

What you’re paying for

Validators (or sequencers on L2s) process your transaction and include it in a block. Gas compensates them for computation and storage. Without fees, the network would be spammed into uselessness.

TermMeaning
Gas unitsHow much work your transaction requires
Gas pricePrice per unit, usually in gwei (1 gwei = 0.000000001 ETH)
Total feeGas used × gas price

A simple ETH transfer uses ~21,000 gas. A token swap through a DEX might use 150,000–300,000 gas or more.

02

Why fees vary so much

Network congestion — when many people transact at once, users bid higher gas prices to get included sooner. Fees can jump 10× during NFT drops or market panic.

Transaction complexity — interacting with smart contracts costs more than sending coins to an address. Multi-step DeFi (approve + swap + deposit) can mean multiple transactions, each with its own fee.

Layer choice — Ethereum mainnet is the most expensive but most settled. L2s (Arbitrum, Base, Optimism) post batches to mainnet and charge a fraction of the cost.

03

Practical tips

  • Keep some native gas token in your wallet — you can’t pay gas in USDC on Ethereum.
  • Wallets show an estimated fee before you confirm; expand details to see gas price and limit.
  • Failed transactions still cost gas — the network did work even if your swap reverted.
  • For small, frequent actions, use an L2. For large, infrequent moves, mainnet security may be worth the fee.
  • “Max fee” and “priority fee” (EIP-1559) let you cap what you’ll pay; unused amount is refunded.
⚑ One honest flag

A $2 fee on a $50 swap hurts more than the same fee on a $5,000 transfer. Factor gas into position size — especially on mainnet and when yield farming with small balances.

If this cleared something up, you can buy me a coffee.

Buy me a coffee Set your handle in src/components/TipJar.astro
← All guides