What is the Bitcoin mempool?

Lumerin Protocol
Lumerin Blog
Published in
4 min readJul 27, 2021

If you are a Bitcoin user, then you know that transactions don’t go through immediately. They have to be confirmed by miners, who record them permanently in the blockchain. But have you ever wondered where those transactions stay from the moment users broadcast them to the network and until miners confirm them? We’ll explain what mempool is and how it works in this article.

The mempool in detail

Every time a Bitcoin user wants to move funds through the Bitcoin blockchain — whether it is a withdrawal from an exchange or an operation between wallets — , they broadcast a transaction to the network’s nodes. And before miners include it in a block on the chain, that transaction sits on Bitcoin’s memory pool or mempool.

Basically, the mempool acts as a sort of “waiting room” for unconfirmed information or transactions. Technically, it is an intermediate memory on the Bitcoin network that temporarily stores data, from which miners then select and confirm it, permanently adding them to a block on the blockchain.

It’s worth mentioning that the mempool is not a specific, physical storage unit. Instead, it is the aggregated unconfirmed data that the Bitcoin nodes validate and propagate to each other. Each Bitcoin node is different, though. They run at different speeds, use different hardware, and have different internet connections. So we can say that there are as many mempools as there are Bitcoin nodes.

Fees, nodes, and miners: A transaction’s journey to confirmation

Every Bitcoin transaction originates from a wallet. Users set the amount they want to send, the fee they want to pay, and the address they wish to send to. Once they send the funds, the network’s nodes rebroadcast it to each other while running a series of checks to ensure that it’s valid and compliant with Bitcoin’s rules, written in the source code — namely signatures, transaction size, output and input, etc.

Once the transaction passes through the first set of checks, nodes allow it into the mempool. Here’s where miners come in.

Now, because miners are always looking to maximize profits, how long each transaction stays in this limbo of unconfirmed data depends solely on one thing: the fee.

Bitcoin miners will always pick the transactions set with the highest fee from the mempool to secure the highest earnings possible. Once they clear it, they will move to the following higher fee, and so on. In the meantime, new transactions will arrive in the mempool. And if their commission is higher than those already in line, miners will ignore older transactions and pick them first.

That is why attached fees determine how long each transaction stays in the mempool. If its reward is too low, that transaction will most likely sit on the mempool until the ones with higher fees go through.

Mempool functionality: Why is it important?

The most important advantage the mempool provides to Bitcoin is convenience. Being an automatic storage device for pending transactions, users can comfortably interact with the network. If we had no mempool, we would get rejected transactions every time we didn’t set the proper fee. But since we do, we can rest easy knowing that even when the miners’ compensation isn’t high enough, our transaction will remain on the mempool until the volume decreases and miners eventually pick it up.

This brings to another benefit: balancing miner fees. Volume is critical to determine mempool capacity, and that, in turn, is critical to establish miners’ commission. If the network is heavily congested and the mempool starts “filling up,” transactions would be stuck unconfirmed for longer times. Thus, people who need their operations completed immediately will offer to pay higher fees to the miners. However, as prices start rising, users may be discouraged from operating, waiting for more convenient costs, lowering the volume and driving commissions down again.

Vice versa, when there’s less volume, miners will start clearing low-fee transactions. An empty mempool means that any new, incoming transaction will be instantly picked up by miners regardless of how low the fee is. That, in turn, may encourage users to operate in that particular moment, driving volume up and, with it, fee costs.

Finally, considering all we’ve just mentioned, having a tool like the mempool provides excellent insight into on-chain metrics in real-time. It enables users to calculate fees for a given operation, see the congestion level in the network, and estimate the waiting time for their transactions according to the commission they want to pay.

Summing up

What we refer to as the mempool is the aggregation of validated but unconfirmed transactions stored on Bitcoin’s full nodes. These nodes’ capacity to save all pending Bitcoin operations until miners pick them up and include them in a block improves the network’s efficiency and ease of use, along with providing valuable data for both miners and users.

You can visit many sites to check the state of the mempool and the congestion of the network. It’s a great idea to do so before interacting with the Bitcoin blockchain to estimate fees and waiting times.

Bitcoin’s architecture is extremely well designed and crafted, but it can be complex to understand. Make sure you explore every corner of it and learn all there is to learn to avoid mistakes.

Did you learn something new?

Make sure to follow us on Medium for more exclusive content every week. You can also subscribe to our blog and sign up for our weekly newsletter. We’ll be glad to have you!

--

--

Lumerin Protocol
Lumerin Blog

Sublayer network where users can access all kinds of data as RWAs: Bitcoin hashrate or AI compute power, in a completely secure, frictionless & P2P manner