Reading a blockchain with public explorers · Lesson 4 of 8
Fees and the mempool
6 min read
The waiting room: the mempool
When a wallet sends a transaction, it does not go straight into a block. It is passed from node to node across the network, and each node that accepts it keeps it in a waiting area called the mempool (memory pool). Block producers pick transactions from their mempool when they build the next block.
Two facts about the mempool explain a lot of what you see on explorers:
- There is no single, global mempool. Every node keeps its own. They are usually very similar, but a transaction can be visible on one explorer and missing from another, especially in the first seconds or when the network is busy.
- The mempool has limited room. When it fills up, nodes drop the transactions with the lowest fee rates. On Bitcoin, nodes running the default software also drop transactions that have waited unconfirmed for about two weeks. A dropped transaction has not confirmed and the coins have not moved, but it stays valid: anyone can broadcast it again and it can still confirm later, unless the sender spends the same inputs in a new transaction. A sender who simply pays again without doing that could end up paying twice.
Explorers such as mempool.space visualize the mempool as a queue of upcoming blocks, which makes it easy to see where a transaction stands.
How Bitcoin fees work
On Bitcoin, the fee does not depend on how much you send. It depends on how much space your transaction takes up in a block, because block space is the scarce resource.
- Space is measured in virtual bytes (vB). A transaction with many inputs takes more space than one with a single input, whatever the amounts.
- Fees are compared as a fee rate in satoshis per virtual byte (sat/vB).
A simple example: a transaction of 140 vB that pays 2,800 satoshis has a fee rate of 2,800 ÷ 140 = 20 sat/vB. A transaction of 300 vB paying the same 2,800 satoshis has a rate of only about 9.3 sat/vB and will usually wait longer, even though the fee in satoshis is identical.
Since the SegWit upgrade in 2017, signature data is counted at a discount, which is why newer address types (bc1q… and bc1p…) usually produce cheaper transactions than old ones starting with 1.
Miners want to earn as much as possible from the limited space, so they generally fill blocks with the highest fee rates first. That is why explorers show fee estimates in sat/vB, often as "high", "medium" and "low" priority, or as the rate needed to get into the next block.
When a Bitcoin transaction is stuck
If a transaction pays too low a fee rate for current demand, it can sit unconfirmed for hours or days. There are two standard fixes, and explorers show signs of both.
Replace-by-fee (RBF). The sender broadcasts a new version of the transaction that spends the same inputs and pays a higher fee. Nodes replace the old version with the new one. Explorers mark the original as replaced and link to the replacement. Because the transaction data changed, the replacement has a different TXID. This surprises many people: a TXID you were given can disappear while an equivalent payment confirms under a new TXID.
Child pays for parent (CPFP). The recipient (or the sender, using the change output) spends an output of the stuck transaction in a new "child" transaction with a high fee. Miners can only collect the child's fee if they also include the parent, so they take both. Explorers often show the combined, effective fee rate.
How Ethereum fees work
Ethereum measures work in gas. Every operation in a transaction costs an amount of gas set by the protocol: a plain transfer of ETH to an existing account costs 21,000 gas, while a token swap often costs five to ten times as much. The fee is:
Fee = gas used × gas price
Gas prices are quoted in gwei, where 1 gwei is one billionth of an ETH (0.000000001 ETH).
Since the London upgrade in August 2021 (EIP-1559), the gas price has two parts:
- Base fee: set by the network for each block and the same for every transaction in it. It rises when blocks are more than half full and falls when they are less than half full, by at most 12.5% from one block to the next. The base fee is burned: it is destroyed rather than paid to anyone.
- Priority fee (the tip): an extra amount per unit of gas that goes to the validator's fee recipient as an incentive to include the transaction.
The sender also sets a max fee per gas, the most they are willing to pay. If the base fee plus tip is lower than the max, the difference is never charged.
On an Ethereum transaction page you will typically see:
| Field | Meaning |
|---|---|
| Gas limit | The most gas the sender allowed the transaction to use |
| Gas used | How much it actually used, often shown as a percentage of the limit |
| Base fee, max fee, priority fee | The parts of the gas price, in gwei |
| Transaction fee | Gas used × effective gas price, in ETH |
| Burnt fees | The base-fee part that was destroyed |
One important rule: a transaction that fails still pays for the gas it consumed. The value it tried to send does not move, but the fee is gone. Explorers show such transactions with a "Failed" or "Reverted" status and a fee greater than zero.
Bitcoin and Ethereum fees side by side
| Bitcoin | Ethereum | |
|---|---|---|
| What you pay for | Space in the block (virtual bytes) | Computation (gas) |
| Unit of comparison | sat/vB | gwei per gas |
| Who receives the fee | The miner | Base fee burned; tip to the validator's fee recipient |
| Depends on amount sent? | No | No |
| Stuck transaction fix | RBF or CPFP | Resend with the same nonce and a higher fee |
The Ethereum fix relies on the nonce, a counter for each account, which the lesson "Reading an Ethereum transaction" explains.
Reading fee estimates sensibly
Fee estimates on explorers are predictions based on the current mempool. They can change within minutes when a burst of activity arrives. If timing matters, look at the current estimate just before sending, not an hour earlier, and remember that wallets usually set fees on your behalf using similar data.
Exam focus: what the mempool is and why each node has its own, why Bitcoin fees depend on transaction size (sat/vB) and not on the amount, how miners prioritize by fee rate, RBF (new TXID) and CPFP, the Ethereum fee formula (gas used × gas price), base fee (burned) versus priority fee, and the fact that failed transactions still pay gas.
Practice questions
Check your understanding. These questions do not count towards the exam.
Sign in to save your progress and continue where you left off. It is free. Sign in