Blockchain fundamentals

What are gas fees? A cross-chain guide for students.

Gas fees are the cost of getting a transaction included in a block. Every chain measures that cost differently, but the goal is the same: prevent spam and pay the network for processing. This guide compares how fees work on EVM, Solana, and Bitcoin-style UTXO chains.

↓ Download gas fees handout (PDF)
evm

EVM chains (Ethereum, Base, Arbitrum)

Fee unit
Gwei (1 Gwei = 10⁻⁹ ETH)
How it works
EIP-1559 separates the fee into a base fee (burned) and a priority fee (tip to validators). The total cost = gas used × (base fee + priority fee).
What drives the cost
  • Network congestion — more pending transactions raise the base fee.
  • Smart contract complexity — loops, storage writes, and SLOADs consume more gas.
  • Gas limit — the maximum gas a block or wallet lets a transaction spend.
Student tip
Use a wallet's 'slow / average / fast' preset to see how priority fee changes confirmation speed. Base fee updates every block (~12s on Ethereum).
svm

Solana (SVM)

Fee unit
Lamports (1 SOL = 10⁹ lamports)
How it works
Solana charges a small base fee per signature plus an optional prioritization fee for extra compute-unit budget. Fees are often flat and very low compared to EVM.
What drives the cost
  • Compute units (CU) — each instruction consumes a measured amount of CU.
  • Signature count — more signers mean slightly higher fees.
  • Prioritization fee — optional tip to jump ahead during congestion.
Student tip
Open Phantom's transaction preview before confirming: it shows CU used and the optional prioritization fee. Fees are paid in SOL even when sending SPL tokens.
btc

Bitcoin (UTXO)

Fee unit
sats/vByte (satoshis per virtual byte)
How it works
Miners pick transactions with the highest fee rate. The total fee = transaction size in vBytes × fee rate. UTXO inputs make the transaction bigger, so more inputs cost more.
What drives the cost
  • Transaction size — more inputs and outputs increase vBytes.
  • Network demand — mempool congestion raises the competitive fee rate.
  • Address type — SegWit and Taproot transactions are smaller than legacy P2PKH.
Student tip
In Unisat or Xverse, set a custom fee rate in sats/vByte during busy periods. A 1-input, 1-output SegWit tx is ~140 vBytes; a 10-input legacy tx can be 1,000+ vBytes.
doge

Dogecoin (Bitcoin fork)

Fee unit
DOGE per kilobyte ( historically) or per byte in modern explorers
How it works
Dogecoin inherited Bitcoin's fee model but uses different default relay rules and much lower typical fee rates. Like Bitcoin, fee depends on transaction size and network load.
What drives the cost
  • Transaction size in bytes — same UTXO input/output logic as Bitcoin.
  • Default minimum relay fee — often lower than Bitcoin's.
  • Miner policy — each miner or pool can set their own fee threshold.
Student tip
MyDoge and other Doge wallets often quote a flat fee. Compare that quote to the transaction's byte size to understand whether you are over- or under-paying.

Side-by-side comparison

ChainPricing modelFee unitCongestion handling
EVMGas used × (base fee + priority fee)GweiBase fee rises block-by-block
SolanaBase signature fee + optional CU priorityLamportsPrioritization fee auction
BitcoinTransaction size × fee ratesats/vByteCompetitive mempool bidding
DogecoinTransaction size × fee rateDOGE per kBMiner policy + lower defaults

How to estimate before confirming

  1. Check the explorer: Block explorers like Basescan, SolanaFM, or mempool.space show current fee levels.
  2. Use wallet presets: Most wallets pre-calculate a competitive fee based on recent blocks.
  3. Simulate the transaction: Tools like Tenderly or a local Hardhat fork can show exact gas usage before mainnet.
  4. Pad for safety: Set a gas limit higher than the estimate so the tx does not run out of gas, but you only pay for what is used.

Common beginner mistakes

  • Confusing gas price and gas limit: Gas limit is the maximum units; gas price is what you pay per unit.
  • Ignoring UTXO size: On Bitcoin and Dogecoin, combining many small inputs makes a transaction much more expensive.
  • Missing Solana prioritization: During airdrops or NFT mints, adding a small prioritization fee can be the difference between landing and failing.
  • Setting fees too low: Transactions can sit pending for hours or be dropped by the network.

Lab connection: gas fees in the Staking Lab

When you deploy and interact with the SimpleStaking contract on Base Sepolia, every action — stake, claimRewards, and unstake — requires a small amount of Sepolia ETH for gas. Because Base Sepolia uses the same EIP-1559 model as Base mainnet, it is the perfect place to practice estimating fees before using real funds.

Open Staking Lab →