0%
Level 2

Fees and Gas Explained

Why transactions cost money and how fees work.

7 min read
Transaction fees are payments made to validators for processing your transaction. On Ethereum and similar networks, this is called "gas"—a unit measuring computational effort. Fees compensate the network for its resources and prevent spam.

Why This Matters

Understanding fees helps you avoid overpaying during calm periods and underpaying during busy times (which can leave transactions stuck). Fees can vary from pennies to $50+ depending on network conditions.

Simple Analogy

Think of blockchain fees like shipping costs. Regular mail (low fee) is cheap but slow. Express shipping (high fee) costs more but arrives faster. During the holiday rush (high network activity), all shipping costs more because everyone's competing for limited capacity. Validators are like postal workers who pick up the packages with the best tips first.

Fee Structures by Network

NetworkFee NameTypical CostWhat Affects It
BitcoinTransaction fee$0.50 - $10Transaction size (bytes), network congestion
EthereumGas fee$0.50 - $50+Computational complexity, network congestion
SolanaTransaction fee$0.00025Generally very low and stable
Layer 2 (Arbitrum, etc.)Gas fee$0.01 - $0.50L2 congestion, L1 data costs

📊 Ethereum Gas Calculation

Total Fee = Gas Used × Gas Price. Example: Simple transfer uses ~21,000 gas. At 30 gwei gas price: 21,000 × 30 gwei = 630,000 gwei = 0.00063 ETH. At $3,000/ETH, that\'s about $1.89. Complex smart contract interactions use more gas (100,000+ units).

Understanding Ethereum Gas

Gas Units

Measure of computational work. Simple transfers use ~21,000 gas. Complex operations use more.

Gas Price (gwei)

How much you pay per unit of gas. Higher price = faster processing. 1 gwei = 0.000000001 ETH.

Base Fee + Priority Fee

Base fee is burned (destroyed). Priority fee (tip) goes to validators. Higher tip = higher priority.

Gas Limit

Maximum gas you're willing to use. Set too low and your transaction fails (but you still pay for gas used).

How to Minimize Fees

1
Check current gas prices
Use tools like etherscan.io/gastracker to see current network conditions before transacting.
2
Time your transactions
Fees are typically lowest on weekends and during off-peak hours (early morning UTC).
3
Use Layer 2 networks
Networks like Arbitrum, Optimism, or Polygon process transactions at a fraction of Ethereum mainnet cost.
4
Batch transactions when possible
Some wallets and platforms let you combine multiple actions into one transaction.
5
Set appropriate gas limits
Don't set gas limits too high (wastes money) or too low (transaction fails).

Fee-Related Mistakes

  • Setting gas too low makes transactions fail—you lose the gas fee and nothing happens
  • Setting gas too high wastes money (unused gas is refunded, but not overpaid price)
  • Ignoring fees during high congestion can result in paying $50+ for simple transfers
  • Some wallets default to high fees—always check before confirming
  • Failed transactions still cost gas—the work was done even though it didn't complete

Why Do Fees Spike?

Blockchains have limited capacity per block. When demand exceeds capacity, users bid against each other for space, driving fees up.

Common causes of fee spikes:

  • Popular NFT drops (everyone minting at once)
  • Market volatility (people rushing to trade)
  • New token launches (high demand for swaps)
  • Airdrop claims (millions trying to claim simultaneously)

Key Takeaways

  • Fees compensate validators and prevent network spam
  • Ethereum fees = Gas Used × Gas Price (varies by congestion)
  • Higher fees = faster processing (validators prioritize higher payers)
  • Layer 2 networks offer much lower fees for most transactions
  • Always check current gas prices before making transactions

Glossary terms in this module: