Fees and gas, what you pay to use a blockchain
Why every blockchain transaction costs a fee, how Ethereum gas, base fees and tips work with a worked example, and the other costs (spreads, exchange and withdrawal fees) that often matter more.
Why blockchains charge fees
A public blockchain is run by many independent computers. Space in each block is limited, and processing transactions costs those computers resources. Fees do three jobs:
- Pay the people securing the network (miners on Bitcoin, validators on Ethereum).
- Ration scarce block space: when many people want to transact, those who pay more get included first.
- Prevent spam: if transactions were free, an attacker could flood the network with junk. Ethereum.org gives exactly this reason for gas, including preventing runaway programs.
The Bitcoin whitepaper describes the incentive as new coins plus transaction fees, and anticipates that once new issuance ends, fees alone will reward miners. Bitcoin.org's FAQ makes the same point.
Bitcoin fees in brief
On Bitcoin, the fee depends mainly on the size of your transaction in data (not on how much bitcoin you send) and on how busy the network is. Sending a small amount can cost the same as sending a large amount. Wallets usually suggest a fee for "fast", "normal" or "slow" confirmation. Pay too little at a busy time and your transaction may wait a long while.
Ethereum gas explained
Ethereum measures the computational work of a transaction in units of gas. Ethereum.org explains:
- Gas used: how many units your transaction needs. A simple ETH transfer uses 21,000 gas. Interacting with a complex smart contract uses more.
- Gas price: how much ETH you pay per unit, usually quoted in gwei. One gwei is one-billionth of an ETH.
- Base fee: a minimum price per unit set by the protocol for each block. It rises when blocks are fuller than the target and falls when they are emptier, by up to 12.5% per block. The base fee is burned: destroyed rather than paid to anyone.
- Priority fee (tip): an extra amount per unit that goes to the validator to encourage inclusion.
- Max fee: an optional ceiling you set; anything above what is actually needed is refunded.
The formula is: fee = gas used × (base fee + priority fee).
Worked example
Ethereum.org gives this example. Sending 1 ETH needs 21,000 gas. With a base fee of 10 gwei and a tip of 2 gwei:
- Fee = 21,000 × 12 gwei = 252,000 gwei = 0.000252 ETH.
- Of that, 21,000 × 10 = 210,000 gwei (0.00021 ETH) is burned.
- 21,000 × 2 = 42,000 gwei (0.000042 ETH) goes to the validator as a tip.
The same transaction might cost far more during a busy period, when the base fee climbs and users outbid each other with tips, or less when the network is quiet.
Failed transactions still cost gas
If a transaction runs out of gas during execution, Ethereum reverts its effects but the gas used is still consumed. In plain words: you can pay a fee and get nothing done. Setting the gas limit sensibly (wallets usually do this) avoids most of these cases.
Layer 2 networks
Because block space on Ethereum's main chain is limited, many applications run on layer 2 networks that bundle many transactions together and post a summary to the main chain. Ethereum.org notes that scaling upgrades and layer 2 networks aim to reduce gas costs. Fees on these networks are often much lower, but they add their own complexity and their own security assumptions, and moving funds between networks has its own costs and risks (see the "wrong network" warning in: How crypto transactions and wallets work).
The costs that often matter more
For many beginners the on-chain fee is not the biggest cost. Watch for:
- Spreads. The difference between the buy and sell price on a platform. "Commission-free" apps may quote a buy price noticeably above the market and a sell price below it. FINRA makes the same general point about ETFs: spreads can range from nearly zero to much wider (see: Liquidity, spread, volume and who is on the other side, in Markets explanation).
- Trading fees. A percentage charged per trade by the exchange.
- Deposit and withdrawal fees. Some platforms charge to move money in or out, or to withdraw crypto to your own wallet.
- Card and conversion fees. Buying with a card or in a currency other than the platform's base currency can add charges.
- Swap costs on decentralised exchanges. Besides gas, you may pay a pool fee and suffer price impact (slippage) in thin markets.
Worked example (illustrative numbers). You buy 500 worth of a token with a card on an app that charges a 1.5% card fee and quotes a buy price 1% above the market. You pay about 12.50 in visible and hidden costs before any gas. If you sell soon after at a price 1% below market, the round trip costs roughly 3.5% of your money, so the price has to rise that much just for you to break even.
Tips for keeping costs down
- Compare the all-in price, including spread, not just the advertised fee.
- Avoid unnecessary transfers between platforms and networks.
- For non-urgent Ethereum transactions, wallets often let you choose a lower priority; activity varies through the day and week.
- Batch purchases rather than making many tiny ones, where fixed fees bite hardest.
- Be wary of "free" offers; someone is paying for the service, often you through the spread.
Key takeaways
- Fees reward network operators, ration block space and prevent spam.
- Bitcoin fees depend on transaction data size and network demand, not the amount sent.
- Ethereum fee = gas used × (base fee + tip); the base fee is burned, the tip goes to the validator.
- Failed Ethereum transactions can still cost gas.
- Spreads, card fees and withdrawal fees are often bigger than the blockchain fee itself.
Common mistakes
Looking only at the advertised trading fee, sending many small transfers, panicking and repeatedly resubmitting a pending transaction, and ignoring the spread on "commission-free" apps.
This article is educational and not personal financial advice.
Test yourself
- A transaction uses 50,000 gas with a base fee of 20 gwei and a tip of 1 gwei. What is the fee in gwei? Answer: 50,000 × 21 = 1,050,000 gwei, or 0.00105 ETH.
- What happens to the base fee portion of an Ethereum fee? Answer: It is burned, removed from circulation, rather than paid to the validator.
- Why can a "zero commission" crypto app still be expensive? Answer: It may charge through wider spreads, card fees or withdrawal fees.
Sources
For educational purposes only. This is not financial advice. Investing carries risk, including losing the money you put in. Do your own research.