Bitcoin is a cryptocurrency network that enables users to send and receive electronic payments anywhere in the world. There are no physical bitcoins, nor are there accounts in which bitcoins are held. Instead, Bitcoin acts as a form of electronic cash, and users can make peer-to-peer (P2P) transactions using the Bitcoin blockchain, which acts as a kind of electronic ledger. The blockchain is constantly updated by nodes, which share updated balances and data across the network. However, before transactions can be added to the blockchain, they must go to the mempool.
How Does a Bitcoin Transaction Work?
Before we reach the mempool, let’s understand how a Bitcoin transaction works. All bitcoin transactions are simply pending transactions and only exist in the mempool before it’s confirmed. Whenever a user initiates a bitcoin transaction, it’s signed cryptographically and sent to the Bitcoin network waiting for a miner to verify the transaction and add it to the blockchain. Every verified transaction is publicly available and accessible on the public ledger as a means to transparently record and distribute to the ledger of each Bitcoin transaction without being able to be manipulated.
Blockchain technology makes decentralization possible, but it has its limitations. For example, the Bitcoin network processes about 4.6 Transactions per second (TPS) is the number of transactions a blockchain network can process each second or the number o... or TPS. Compare this to VisaNet, which processes 1,700 TPS. While some adaptations are possible to improve the scalability of blockchain technology, the system continues to be comparatively slow, which has led to high fees and occasional delays, particularly during periods of heavy transaction volume.
The blockchain was originally designed to allow Bitcoin to operate without banks, governmental oversight, regulatory agencies or other central authority. While Bitcoin doesn’t need external authorities to operate, it still needs to be capable of verifying transactions, which it does through cryptographic keys.
Bitcoin’s public-key cryptography act as identification for users, enabling them to access their wallets or accounts, and mainly to ensure the integrity of the transactions. Every user has a private key for their own use and a public key that’s visible to everyone on the system. Together, these keys act as a digital signature to authenticate transactions.
When two users reach an agreement about a specific transaction, the next step is authorization. Each transaction must be authorized before it can be added to the blockchain. This is done through consensus, which means that all the decentralized parties like the network’s computers, or nodes need to agree objectively that the transaction is authorized and valid. The owners (miners) of the nodes are incentivized to verify an unconfirmed transaction through the proof of work consensus, or PoW, which requires them to solve cryptographic problems, or complex mathematical puzzles.
Once this problem is solved, the transaction is verified and can be added to the block. When the Bitcoin block is filled, it is added to the blockchain termed as finalization, and the next block is opened.
What Is a Bitcoin Mempool?
The mempool, or memory pool, is a virtual waiting room where it collects valid a pending transaction until a miner processes them to be added in the next block. Each node maintains its own mempool, and each node has its own storage capacity for unconfirmed transactions. When a transaction is confirmed and included in a block, it is removed from the mempool.
Nodes share the mempool data by relaying the signed transactions from one another until it reaches the entire network. When an overall mempool reaches full capacity during periods of high transaction volume, the node prioritizes transactions judging on the bid transaction fees that are above the threshold fees. Any transactions that a lower than the threshold fees will be removed from the mempool and only newer transactions with fees that meet the minimum are added back into the mempool. In other words, higher fee transactions are prioritized to be processed and cleared from the mempool and to be added into the block.
The Correlation Between Bitcoin’s Mempool and Transaction Fees
If we think of the mempool as a waiting room, when it’s congested, there will be a high transaction volume waiting to be cleared. Typically, transactions move smoothly in and out of the mempool as they’re verified and added to the block, but occasionally, the mempool can become congested.
Periods of congestion can usually be traced to either a high volume of transactions or the trade hash decreasing abruptly. During these periods, the mempool becomes congested, and delays can occur, resulting in an increase in fees.
The term “trade hash” refers to blockchain mining difficulty. There may not be enough miners to handle the complexity or congestion of the blockchain at that moment. Therefore, some transactions must wait longer to be confirmed.
Each Bitcoin transaction sits in the mempool until it’s ready to be confirmed, but there is no single, overarching mempool. Every node has its associated mempool, and by default, the mempool typically does not exceed 300 MB.
When the mempool is congested, users have the option of paying higher fees, which can push their transactions to the front of the line for faster confirmation. On the other hand, the lower fee transactions will stay in the mempool, where they’ll remain unconfirmed until the congestion clears. Similarly, during times of minimal congestion when transaction volume is low, fees are correspondingly lower. Once a transaction is picked up and added to a confirmed block, it’s removed from the mempool.
You can check your BTC transaction status here.
Understanding the Mempool Size and Transaction Count
The mempool size in bytes is a metric to estimate how long the congestion will last while the mempool transaction count chart offers a clear display of the influx of transactions that are causing congestion. The bigger the mempool size usually translate to a more congested network which will result in a longer average confirmation time and higher priority fees is required for the transactions to be added to the block. However, if the mempool size drops, it means a node has received a new valid block and ended up removing the pending transactions which are contained in the block from the mempool.
Typically, the mempool size can fluctuate as it depends on the number of transactions that are being relayed. Since each node also has its own rendition of pending transactions depending on its capabilities to store unconfirmed transactions, this also explains why the mempool size varies.
On the contrary, if the mempool transaction count increases, it means the total number of unconfirmed transactions in the mempool is surging. Thus, a higher fee is incurred. For example, on October 4, 2021, Bitcoin’s mempool contained 4.25k of pending transactions, and the average transaction fee was $2.45. Compare this with October 25, 2021, when the mempool size reached a high of 6.6k transactions, with an average transaction fee of $3.09.
You can check the current fee rates here.
What to Do if There’s an Overload of Transactions?
During times of peak traffic, the Bitcoin network can end up with a significant backlog of transactions, increasing wait times and driving up transaction fees. When demand outpaces supply, miners have considerable leeway in choosing which transactions they’ll process first. In scenarios such as these, even those who have paid generous fees may be waiting longer than expected.
Several things contribute to the backlog, including the fact that Bitcoin’s blockchain is not easily scalable — which means that it’s also easily overloaded. When dealing with periods of high congestion, you have the option of just waiting it out, or switching to the Lightning Network to complete smaller transactions off the main chain, or paying a higher transaction fee.
Once the transaction has been sent, you still have a few options that can speed it along. If your transaction is stagnating in the queue, you can jump ahead in line with opt-in Replace-by-Fee, or opt-in RBF, which allows you to resend your transaction with a higher fee. Not all wallets support this option, however. If yours doesn’t, you’ll need to consider alternatives, such as “child pays for parent,” or CPFP. With CPFP, miners choose transactions that include the greatest combined fees. You can also use a transaction accelerator, which allows you to submit transactions that are at least 0.1 mBTC per kilobyte to the ViaBTC mining pool for priority confirmation.
Finally, you can use the Lightning Network, which is a Layer 2 solution. The Lightning Network allows you to open a new channel, complete as many transactions as the desired off-chain from the conventional Bitcoin network, and then close the payment channel when the transactions are verified. When using the Lightning Network, you can essentially skip the congested queue, and your fees may also be significantly lower.
If neither the Lightning Network nor any other solution is an option, rest assured that even with stuck transactions, your bitcoin is not lost. It will remain in your wallet until the transaction is confirmed.
So, What if the Mempool Didn’t Exist?
Every transaction must go through the mempool before it can be added to the blockchain. During times of high traffic and congestion, the mempool collects and stores transactions until miners can add them to the block.
The mempool also makes it possible for nodes to access other nodes’ mempools, which provides them with more details about specific transactions prior to confirmation. While most users want to spend as little time as possible in the mempool, that isn’t always possible — especially when more transactions arrive than can be cleared promptly. When a block is mined, all the transactions it contains will be cleared from the mempool, which decreases the size of the mempool accordingly.
Without the mempool, nodes would be unable to view incoming transactions, and they’d have no idea as to how congested the blockchain network is. It would be impossible to understand or pinpoint the source of traffic jams, high fees and other issues associated with congestion.
The Bottom Line
Waiting for a transaction to clear can be frustrating. While you might be tempted to blame the mempool, it’s a crucial feature of the Bitcoin network because it’s used to aggregate and hold transactions until they’re ready to add to the blockchain. Understanding how the mempool works can help you use it to your advantage to ensure your transactions are processed on time — and to decrease your frustration if they aren’t.