In this guide, I want to unravel the mysteries of one aspect of Bitcoin – the memory pool, or as it is more commonly known, the mempool.
If you’ve ever completed a Bitcoin transaction and it’s seemed to take forever to go through you’ve run into the Bitcoin mempool. In times when the Bitcoin network is seeing heavy usage there are people who have had to wait hours, and in some cases days, for a transaction to be confirmed.
This happens when the size of the mempool grows exceptionally large. In fact, exchange support operators will often use the mempool as a reason for delayed withdrawals. They will tell you the mempool has spiked in size and confirmations, thus withdrawals, are taking longer than normal.
In this post, I will give you everything that you need to know about the Bitcoin Mempool. I will also give you some top tips in order to speed up your transaction.
Page Contents 👉
The Bitcoin Mempool
As I mentioned earlier the word ‘mempool’ is a shortened form of Memory Pool. It is a place where data is stored to await processing. In the case of the Bitcoin mempool, the data being stored is the transaction data of the Bitcoin network. Because of this you’ll sometimes hear the mempool referred to as the transaction pool.
The Bitcoin mempool is where all the pending transactions wait to be picked up by miners, who will validate them and add them to the next block in the blockchain.
Bitcoin Mempool over the past year
While the mempool is associated with the blockchain it isn’t a part of the blockchain. The mempool is not a single location. Rather each Bitcoin node has its own mempool, and each mempool has its own memory capacity. These nodes are run by Bitcoin miners and Bitcoin users who choose to run a full node on their computer to help decentralize and secure the network.
Now let’s learn how transactions get into the mempool in the first place, and how they get out of the mempool and stored in a block on the blockchain.
Before the Mempool
Before anything happens someone needs to initiate a transaction. This is when a Bitcoin wallet is opened and a user enters a destination address and the amount to be sent and then clicks the send button. A Bitcoin transaction has just been started.
As we all know this transaction won’t send the Bitcoin immediately to the recipient’s wallet address. Instead, the transaction is broadcast to other nodes in the network. This broadcast happens when the transaction is signed with the sender’s private keys and unspent outputs are selected to construct the transaction.
There are also a series of checks performed which I won’t go into detail about here. Once these checks are complete the transaction gets added to the mempool of unconfirmed Bitcoin transactions.
What happens in the Mempool?
Your transaction arrives in the mempool and joins the thousands and tens of thousands of other transactions waiting for confirmation in the mempool.
The confirmations come from miners. Every transaction on the Bitcoin blockchain needs at least one confirmation before it reaches the recipient address. That’s because this first confirmation bundles the transaction into a block and it then gets indelibly added to the blockchain.
Bitcoin transaction life-cycle with Mempool. Image Source
Just because your transaction is in the mempool it doesn’t mean a miner has to pick it up and confirm it. And if it isn’t picked up for a long time it can get canceled and returned to you from the mempool. Currently, the expiry of transactions from the mempool is set to 2 weeks.
That means any transaction which remains in the mempool for longer than 2 weeks will have its funds sent back to the sender. This expiry was put in place to keep the mempool from getting bloated with unconfirmed transactions.
So, what is it that allows some transactions to get confirmed within 10 minutes, while others could end up being returned to the sender after sitting in the mempool for 2 weeks? There are a few factors, but there are two that are most important in determining how quickly a transaction is picked up from the mempool and confirmed.
Bitcoin Transaction Fees
I’m sure you’re aware that there’s a transaction fee for each Bitcoin transaction. That fee is set by the sender and most wallets allow you to change the transaction fee you’re willing to pay. Typically the transaction fee is small so you hardly notice it. That transaction fee is an additional incentive that gets tacked onto the mining reward (currently 12.5 BTC) that’s paid out when a miner finds a block.
Estimated fee and transaction time in Bitcoin Fee Calculator
Because there are thousands of transactions in a block these small transaction fees add up. Just as you’re able to set the transaction fee, miners are able to choose which transactions to confirm.
And of course, they pick those with the highest transaction fees. That means when the mempool is extremely full you’re transaction with a small fee might not get picked up. And that brings us to the second reason for delayed transactions.
Bitcoin Mempool Size
After a block is validated all the transactions it contains are removed from the mempool. That’s necessary to create space in the mempool for new incoming transactions. When a block is confirmed you’ll see a drop in the size of the mempool.
The size of the mempool is constantly fluctuating as transactions are confirmed and new transactions are placed in the mempool. Sometimes the mempool is getting smaller, and sometimes it is getting larger. Remember that a block is created once every ten minutes, and each block can only hold a limited number of transactions.
Mempool based on transaction size over past 30 days. Image via Jochen-Hoenicke
However, there is no limit on how many transactions can be sent to the mempool. This means sometimes there are more new transactions arriving at the mempool than there are transactions being confirmed and removed. And when this occurs there are delays in transactions getting confirmed.
There is also a limit on the number of unconfirmed transactions that can be stored, which is determined by the number of nodes in the Bitcoin network. Because there is a limit on memory available the mempool is programmed to set a minimum fee once it reaches a set size limit.
Any transactions with a fee lower than this minimum are removed from the mempool, and only new transactions with a large enough fee are accepted into the mempool.
Speeding up Your Transaction
Now that you have a fair understanding of what the Bitcoin mempool is and how it works, it helps to take a look at a few methods that you can use in order to speed up your transaction and avoid the dreaded “unconfirmed” status.
Below are some of the ordered steps that you can take in to get a faster transaction.
1. Use SegWit Wallets
Segregated Witness (SegWit) is a relatively new upgrade to the Bitcoin network that helps free up space in Bitcoin blocks. Essentially, when you send a SegWit enabled transaction, all of the data that is related to the signature is removed from the transaction.
SegWit was activated on the Bitcoin network on the 23 August 2017 and since then, there are a number of wallets that have support for the new transaction type. These include the likes of Electrum, Ledger, Samourai and many others.
This is something that you will have to choose when you are initially setting up your wallet. You will get the option of either going for the SegWit or “Legacy”.
2. Choose a Higher Fee
As mentioned above, the fee that you choose for the transaction will impact on the speed at which it is picked up by the miners. Hence, a higher fee means it is more likely to be picked up early.
Choosing a transaction fee in the Electrum Bitcoin Wallet
Of course, you don’t want to pay an unnecessarily high fee if a lower one is required for your desired time-frame. Most wallets will give you an indication of within how many blocks it will take for the transaction to be propagated based on a set fee. This will allow you to estimate the time it will take.
Pro Tip?: There are a number of fee calculators that will give you an indication of the fee that needs to be applied and how many minutes it will take.
3. Time the Transactions Carefully
The Bitcoin mempool and the unconfirmed transactions associated with it are changing constantly. Hence, if the transaction is not urgent you can wait until the mempool shrinks down and then initiate your transaction.
There are a number of websites that you can use to track the mempool as well as the number of unconfirmed transactions. You can check out Blockchain.com for the mempool size or you can jump on over to BTC.com for the number of unconfirmed transactions.
How long it will take before the unconfirmed transactions get cleared and the mempool to die down is really hard to say. There are numerous factors that could impact on this so you will need to decide whether to push on or hold out.
4. Use a Transaction Accelerator
If you do send a transaction and it happens to get stuck because the fee was too low, then you can always make use of a Bitcoin transaction accelerator. These services are provided by the miners and allow users to request the operators to “push” their transaction through.
Pro Tip?: ViaBTC offers a free transaction acceleration service. While prioritization is not guaranteed, it could be worth a try at first.
If you want to make sure that your transaction gets pushed through then you can use the paid services. These are guaranteed services and the user’s transaction is pushed through as a priority.
The mempool is a holding area for transactions as they wait for miners to confirm them and add them to a block. In some instances the mempool can become too crowded, causing delays in transaction confirmation, and higher fees.
Of course, knowing exactly what the Bitcoin mempool is is only the first step. Once you get a grasp exactly of how it works and how it impacts your transaction, you can fine tune these transactions to get the most bang for your buck (read “satoshis”).
Having said this, the role that a bloated mempool will have on slow transactions may eventually become a thing of the past.
This is because of off-chain scaling solutions such as the Lightning Network. There are numerous Lightning payment channels that have opened up and are taking the strain off of the Bitcoin blockchain. It will be interesting to see how the size of the Mempool evolves as Lightning adoption takes off.
Featured Image via Fotolia