Lesson 2 — Networks and fees explained: mempool, priority and Lightning
Lesson 2 of 10 · 4 min
How Bitcoin and Ethereum decide which transactions go first: mempool, fee per byte, base fee and priority fee, stuck transactions, RBF and the Lightning Network.
When you send crypto, the transaction does not enter a block immediately: it stays in a waiting room called the mempool, and the entities that create blocks choose first the ones that pay more per unit of space. That is why the same transfer can cost cents on a quiet day and several euros on a busy day. In this lesson you will see how fees are calculated on Bitcoin and Ethereum and what to do when a transaction gets stuck.
The mempool: the waiting room
Every node on the network keeps the valid transactions that have not yet been confirmed. Miners (Bitcoin) or validators (Ethereum) assemble the next block with the transactions that pay them best. If demand is greater than the available space, low-fee transactions wait — sometimes for hours or days.
You can see the size of the network that keeps these copies in the tool Bitcoin Network Nodes: thousands of nodes, spread across many countries, verify every transaction.
Bitcoin: fee by size, not by value
On Bitcoin, the fee depends on the size of the transaction in virtual bytes (vB), not on the value sent. Sending 10 euros or 10 000 euros can cost the same.
How it is calculated: fee = size (vB) × fee per vB (sat/vB). Hypothetical example: a simple transaction of 140 vB with 10 sat/vB pays 1 400 satoshis. The size increases when the wallet combines many small "coins" (UTXOs) received at different times. That is why receiving many tiny payments can make them expensive to spend later.
Ethereum: base fee + tip
Since 2021 (EIP-1559), every Ethereum block has a base fee per unit of gas, which rises or falls automatically according to demand, and is burned. On top of that, you pay a tip (priority fee) to the validator.
How it is calculated: fee = gas used × (base fee + tip). A simple ETH transfer uses 21 000 units of gas; a swap on a decentralised exchange can use more than 100 000. Try it on the Gas Fee Calculator with the current gas price and compare the cost of a simple transfer with a more complex operation.
Stuck transaction: what to do
If you paid too little and the network became congested:
- Wait: when demand drops, the transaction will eventually go through (or it is discarded from the mempool and the funds become available again).
- Bitcoin — RBF (Replace-By-Fee): if your wallet allows it, you send the same transaction with a higher fee, replacing the previous one.
- Bitcoin — CPFP: the recipient spends the unconfirmed output with a high fee, "pulling" the parent transaction.
- Ethereum — same nonce: you send a new transaction with the same sequence number (nonce) and a higher tip.
To check its status, paste the identifier into the Transaction Checker: you see whether it is pending, in which block it entered and what fee it paid.
Lightning Network: fast payments on top of Bitcoin
Lightning is a "layer 2" of Bitcoin: two parties open a channel with a transaction on the blockchain and then exchange instant, almost free payments between themselves without recording each one. Only the opening and closing of the channel pay a fee on the main network. It works well for small and frequent amounts; for storing large values long term, the main network remains the standard. You will see layer 2 solutions in more detail in the Advanced course.
How much do you pay per year?
Small fees add up. Use the Total Fee Cost tool with your habits (number of operations, exchange commissions, withdrawal fees) and see the annual cost. Often, grouping operations or choosing the right network saves more than looking for the exchange with the lowest commission. The article What is gas and network fees has more examples, and How to send cryptocurrencies safely reminds you of the checklist before every transfer.
Summary
- Transactions wait in the mempool; the ones that pay more per unit of space enter first.
- Bitcoin: fee = size in vB × sat/vB; the value sent does not count.
- Ethereum: fee = gas × (base fee + tip); complex operations use more gas.
- Stuck transactions are resolved by waiting, RBF, CPFP or resending with the same nonce.
- Lightning makes small payments fast and cheap.
In the next lesson you will study stablecoins in depth.
Frequently asked questions
Why does the fee not depend on the value sent?
Because the scarce resource is the space in the block. A transaction that is large in bytes occupies more space, regardless of the value.
What is the mempool?
It is the set of valid transactions waiting for confirmation. Each node has its own copy, and block creators choose transactions from it.
Can I cancel a transaction that has already been sent?
A confirmed transaction cannot be cancelled. While it is pending, some wallets allow you to replace it with another one that has a higher fee (RBF on Bitcoin, same nonce on Ethereum).
Practise with the tools
- Fee (gas) calculator — Estimate a transaction's cost from current network fees, in US$ and in €.
- All-in cost with fees — Combine CoinGecko’s spot price with fees you enter yourself and compute the break-even price to recover them. We do not invent exchange commissions.
- Check a transaction — Look up a Bitcoin txid on mempool.space or an Ethereum hash on Blockscout and see whether it is confirmed, plus the value and fee when the source provides them.
- Bitcoin network nodes — See Bitnodes’ public snapshot: how many nodes were found, how many the source marks as reachable, and the block height.
Read next
- What are gas and network fees in crypto? A simple explanation with examples
- How to send crypto safely: a checklist before you press "Send"
- How does Bitcoin mining work? A simple explanation for beginners