TeachMeBitcoin

What is the Mempool

From TeachMeBitcoin, the free encyclopedia ⏱️ 3 min read

What is the Bitcoin Mempool and How Does it Work?

When you click "Send" in your bitcoin wallet, your transaction does not instantly leap onto the blockchain. Instead, it enters a decentralized, global waiting room known as the Mempool (short for Memory Pool).

To understand why transactions take time to settle and why fees fluctuate, you must understand the inner workings of the mempool.


πŸ›οΈ What is the Mempool?

The mempool is a temporary holding area where valid transactions wait to be selected and mined into a block by a blockchain miner.

[ Your Wallet ] ──► (Broadcasts TX) ──► [ Global Node P2P Mempools ] ──► (Miners Bid for space) ──► [ Mined on Blockchain! ]

πŸ“¦ The Block Size Bottleneck

Why do we need a waiting room in the first place? Why can't transactions be written to the blockchain immediately?

The bottleneck lies in Bitcoin’s block limits: * A new block of transactions is mined onto the blockchain only once every 10 minutes on average. * The maximum size of a single block is restricted (typically holding roughly 2,000 to 4,000 transactions, or about 1.5 to 2.0 virtual Megabytes of data). * However, during busy periods, tens of thousands of transactions can be broadcast to the network every minute.

When the incoming volume of transactions exceeds the capacity of a single block, the mempool grows, creating a queue.


🎟️ The Bidding War for Block Space

Because block space is extremely scarce, miners must prioritize which transactions from their mempools are included in their next candidate block.

To maximize their profits, miners sort the transactions in their local mempools by their feerate (the transaction fee size). 1. Transactions that bid the highest fees are placed at the front of the queue and get mined into the very next block (~10 minutes). 2. Transactions with standard fees wait in the middle of the queue and might take 20 to 60 minutes. 3. Transactions with very low fees sit at the back of the queue, waiting for a quiet period (such as weekends or late nights) when the mempool clears out.

   FRONT OF THE QUEUE  ◄───────────────────────────────────────────────────►  BACK OF THE QUEUE
[ High-Fee Transactions ($10+) ]   [ Medium-Fee Transactions ($2) ]   [ Low-Fee Transactions ($0.20) ]
        (Mined in ~10 mins)                 (Mined in ~30-60 mins)              (Waits for quiet period)
ℹ️ IMPORTANT

If you set a transaction fee that is too low, your transaction can get stuck in the mempool. If the network remains highly congested, nodes will eventually purge your transaction from their memory pools after 2 weeks (known as the mempool expiry limit). If this occurs, the transaction disappears, and your coins remain safely in your wallet!

β˜• Help support TeachMeBitcoin

TeachMeBitcoin is an ad-free, open-source educational repository curated by a passionate team of Bitcoin researchers and educators for public benefit. If you found our articles helpful, please consider supporting our hosting and ongoing content updates with a clean donation:

Ethereum: 0x578417C51783663D8A6A811B3544E1f779D39A85
Bitcoin: bc1q77k9e95rn669kpzyjr8ke9w95zhk7pa5s63qzz
Solana: 4ycT2ayqeMucixj3wS8Ay8Tq9NRDYRPKYbj3UGESyQ4J
Address copied to clipboard!