Back

What is a Mempool?

General Wallet Use

15 min

Most Bitcoin users are aware that transactions are not instantaneous. While the total amount of time it takes for bitcoin to be transferred from one party to another varies between transactions, it can range anywhere between 10 minutes and one full day. However, in between that long wait time, where exactly does the transaction go while it is still pending? 


There is a specific place where transactions go, and it’s called a mempool (memory pool). This Learn Center will explore what a mempool is, how it works, and why certain transactions stay in the mempool longer than others.

What is a Mempool?


A mempool is essentially a waiting room maintained by a blockchain node where not-yet-confirmed transactions stay until they are mined. As previously mentioned, Bitcoin payments are not approved immediately, and the reason is that a new block must be added to the blockchain before a transaction can be approved. However, only certain participants in a network can create and include new blocks. In the case of the Bitcoin network, only crypto miners can create and include new blocks. Unconfirmed transactions remain in the mempool until they are selected by miners in an upcoming block where they are finalized and validated. 


However, an important note to keep in mind is that there is not one mempool that is shared amongst all blockchain nodes nor are there two mempools that are exactly alike. Each node configures its memepool differently, so when they receive transactions and how many they can hold is dependent on how they’re built and what type of hardware (either low-end or high-end) they use.  


How Do Mempools Work?


To understand how mempools work, we must first understand the Bitcoin Transaction Lifecycle since mempools play an integral role in getting a transaction approved. The Bitcoin Transaction Lifecycle is divided into three stages:

Creating a Transaction

A user first creates a transaction by using their Bitcoin wallet. While this piece goes further into the components that make up a Bitcoin transaction [insert link in the sentence preceding this bracket], essentially, they consist of both required information like the amount of bitcoin and the recipient’s Bitcoin address and optional information like type of coins to send and transaction fee.

Broadcasting a Transaction

After the user creates and signs the transaction, the Bitcoin wallet broadcasts it to a nearby node. Once the node receives the transaction, it relays it to other nearby nodes within the Bitcoin network. The other nodes check to see if the transaction has been signed by the sender’s private key. If it has, the nodes confirm that the transaction is valid and send it to the mempool. 

Transaction Confirmation

A miner then selects transactions from the mempool and checks to see if they are valid. If they are, the miner assembles them into a block. After assembling the block, the miner then engages in a process called Proof of Work (PoW) that verifies how accurate transactions are on a blockchain. Miners compete against each other by solving a cryptographic puzzle and including as many valid transactions as possible in their block. The first miner to solve the puzzle and submit a valid block earns both all the transaction fees within that block and a block reward.


The miner then sends the block to nearby nodes within the Bitcoin network in which they verify both the block and the transactions within it. Once the block has been verified, it is added to the blockchain, and its transactions are confirmed. The transactions receive additional confirmations when a new block is added to the blockchain or the blockchain is reorganized. After six confirmations, the transactions become final as they are recorded in the blockchain and cannot be reversed. 

Why Do Some Transactions Get Stuck in Mempools?


Some transactions wait longer in the mempool than others, and there are a few common, yet key reasons that explain why:

Network Congestion

Network congestion is when a mempool becomes overwhelmed with a large number of unconfirmed transactions. Bitcoin blockchains have a limited amount of space (they usually have a 1 MB block limit), meaning that mempools can only take on a certain number of unconfirmed transactions. Therefore, when there are more transactions than available block space, transactions often remain stuck. This can lead to much longer wait times for transactions to be validated, especially ones that have lower fees. 

Very Low Transaction Fees

Along with block subsidies, miners are paid in transaction fees, so when including Bitcoin transactions in blocks, they focus on the ones with the highest fees so that they can maximize their earnings. Because of this incentive, the transactions with the highest fees are prioritized by miners, ensuring that they are the first to be confirmed. This means that transactions with lower fees are often passed over in favor of ones with higher fees and will only become validated if they are the only ones left in the mempool. The lower the fees are, the less likely miners will select and include them in the next block.


This especially becomes an issue in cases of network congestion in which the only transactions that are included in the next block are the ones with a sufficiently high fee. Bitcoin users who can’t match this high transaction fee will often be forced to wait long periods for their transactions to be confirmed. 

The Hash Rate Drops

In some circumstances, transactions remain stuck in the mempool because the hash rate drops. Whenever such an instance occurs, the Bitcoin network will lack the physical computing power to validate many unconfirmed transactions. This leads to only a certain number of transactions becoming validated while the others remain in the mempool for a long time. 

Conclusion


When transactions remain pending, it is because they are lingering in essentially a waiting room maintained by a blockchain node called the mempool. Unconfirmed transactions remain in the mempool until they are selected by a miner (who prioritizes ones with high transaction fees). The miner engages in the Proof of Work process, and the miner who solves the cryptographic puzzle and submits a valid block earns all the fees within that block and a block reward. The miner then sends the block to nearby nodes, and if they validate it, then the transactions within it become confirmed.


Some transactions though are stuck in the mempool longer than others, and it’s usually because of three common reasons: network congestion, very low transaction fees, and the hash rate dropping. 


Connect to web3 applications built on Bitcoin with the Leather browser extension. Install Leather – the only wallet you need to tap into the multilayered Bitcoin economy – today.

This article was updated on 8/19/24

This article was updated on 8/19/24