‘Mempool’ is an amalgamation of the words ‘memory’ and ‘pool.’ Within the cryptocurrency industry, it refers to a system for storing information on unconfirmed transactions that are waiting to be processed. Transactions sitting in a mempool are yet to be recorded into a block and added to the blockchain, which cannot happen until they have been through a series of checks.
In this AAG Academy guide, we’ll go into more detail on what exactly a mempool is, and explain how they work and why they are important. We’ll also look at some of the problems posed by mempools, and answer some frequently asked questions.
Mempools are a critical component of a blockchain network. They help ensure that transactions are dealt with properly, that the necessary checks can be carried out on them to ensure their validity before they are confirmed, and that transactions are not lost after being submitted to the network for processing. They also allow transactions to be sorted based on their priority.
When a cryptocurrency transaction is submitted to a blockchain network for processing, it cannot be approved and added to the database immediately. There are checks it must go through first to ensure it is valid, so it needs a place to sit while these take place. A mempool, which you can think of like a virtual waiting room, solves that problem.
How does a mempool work?
Those checks we touched on above involve broadcasting the transaction information to a series of nodes, which are essentially computers on the network. They check that the transaction is valid, that any necessary data — such as the sender’s signature and the receiver’s address — is present and correct, and confirm that the sender has enough funds in their wallet.
During these checks, the transaction sits in a ‘queued’ state in the mempool. Once a certain number of nodes have decided they are happy with the transaction and approved it, it then enters into a ‘pending’ state in the mempool, where it remains until it can be written into a new block. It will eventually be picked up by a miner or validator for processing.
Once the miner or the validator has carried out their work and the transaction has been processed and recorded, it is confirmed. At this point, the funds are deposited from the sender’s wallet and credited to the receiver’s wallet. Finally, nodes are informed that the transaction is complete and it is then removed from any mempools it was sitting in.
There are a couple of important things to bear in mind about mempools and how transactions are handled. Firstly, there is not just one mempool on a blockchain network; every node has its own mempool, and these can vary in size depending on how much space has been allocated to them by the node’s operator. Each of them may receive transactions at a different time.
Secondly, blockchain transactions are not processed in the order in which they are received. Instead, they are sorted by priority while they are sitting in the mempool, and those that are deemed highest priority are picked up by miners and validators first. These are usually the transactions that have higher fees attached because those are obviously more lucrative.
As a result, how long a transaction sits in the mempool for before it is confirmed is difficult to determine. Things like network congestion, hash rate decreases, and a fluctuation in fees can all have an impact on processing times. It’s also worth noting that larger, more popular networks like Bitcoin and Ethereum typically have longer waiting times than smaller networks.
Why is a mempool important?
As we touched on above, mempools are incredibly important because they provide a safe place for transactions to sit before they can be processed by a blockchain network. This allows them to be checked and prioritized properly, which contributes to network security and efficiency. It also ensures transactions do not get lost when a network is extremely busy.
Without a mempool, blockchain nodes would not be able to see pending transactions, which would make it incredibly difficult — if not impossible — to check their validity and prioritize them before they are handed over to miners or validators. It is likely that fraudulent and invalid transactions would then slip through the gaps and end up being confirmed inadvertently.
Problems with mempools
Mempools do have their downsides as well, of course. During times of high transaction volume, they can become congested, which results in increased transaction fees and longer processing times. Users who need their transactions to be processed quickly may need to pay excessive fees to ensure that they are prioritized by nodes and that their transactions are dealt with first.
A lack of mempool synchronization can also be a problem. As we noted above, there is usually a large number of mempools on a blockchain network, and none of these talk to each other to share transaction data. This can sometimes mean that certain transactions essentially get stuck in one node’s mempool and may never be passed onto a miner or validator for confirmation.
In addition, mempools can be susceptible to transaction spam, which is when attackers attempt to overwhelm a network with invalid transaction data. This contributes to mempool congestion and slows down the network, and because those transactions must go through the same validity checks as others, there is no quick and easy way to weed them out.
Finally, mempools also enable what we refer to as DeFi sandwich attacks. This is when an attacker with knowledge of upcoming transactions — usually because they are operating a node — places ‘frontrunning’ and ‘backrunning’ transactions that cause the value of an asset to change so that they can claim a profit from unsuspecting users.
A mempool can be thought of like a virtual waiting room where cryptocurrency transactions can sit until the network is ready to process them. While they are in the mempool, network nodes check their validity and then they enter a ‘pending’ state until they are picked up for processing. At this point, miners or validators add them to the blockchain database.
Yes, it is possible for Bitcoin transactions to get stuck in a mempool for a number of reasons. When this happens, the most effective way to alleviate the problem is usually to cancel the transaction and then attempt it again.
It is difficult to determine how long a cryptocurrency transaction will take to process. A number of different factors can have an impact on waiting times, including network congestion and increased network fees.
Was this article helpful?
Have a Question? Join our active Discord
Share this article:
About the author
Senior content writer
Senior copywriter for AAG Marketing team with the focus of educating our community on all things web3, blockchain and Metaverse.
This article is intended to provide generalized information designed to educate a broad segment of the public; it does not give personalized investment, legal, or other business and professional advice. Before taking any action, you should always consult with your own financial, legal, tax, investment, or other professional for advice on matters that affect you and/or your business.