Mempool

Why Trust Techopedia

What Is Mempool?

Mempool or memory pool refers to a backlog of pending and unconfirmed transactions in a blockchain.

Advertisements

These unconfirmed transactions wait in the mempool to get validated and finalized in the upcoming block.

Mempool Explained

When you transact on a blockchain network, your crypto payments or transfers are not immediately confirmed. Your transactions have to be validated by miners on proof-of-work (PoW) blockchains and by validators on proof-of-stake (PoS) blockchains, who compile pending transactions into blocks.

Your transactions are only considered final once it is included in a block. Until then, your transactions will wait in a queue alongside all the other unconfirmed transactions in a place called the mempool.

The time taken to finalize a transaction will depend on the following factors:

  • Blockchain network
  • Time between blocks
  • Gas fee
  • Network congestion

How Does Mempool Work?

The journey of a transaction from initiation to confirmation involves several steps. When a transaction is executed on a blockchain, it is broadcast to the entire network and queued in a mempool.

It is important to note that mempools are not standardized. Each blockchain node has its own mempool with transactions that may or may not differ from the transactions in a mempool of another node. A node may be configured in a way to receive transactions at different times, while some nodes may use lower-end hardware which can limit the amount of transactions it can store in its mempool.

Another important fact about the mempool is that not all the transactions in a mempool are treated equally. A miner or validator has the discretion to choose and pick which transactions to prioritize when creating a block.

Users often pay higher-than-average gas fees and offer tips to incentivize miners and validators to prioritize their transactions. Miners and validators are always looking to extract the maximum value from a block due to the limited blockspace.

This demand for blockspace has created a dynamic marketplace within the mempool. The crypto world refers to it as maximal extractable value (more on that later).

Mempool Examples

Let’s consider the bitcoin blockchain as our example to understand mempools and transaction confirmation times. 

Let’s start with a few facts about bitcoin block time. The average time between two bitcoin blocks is about 10 minutes. The blockchain is designed this way by default to maintain consensus and to keep bitcoin mining competitive. 

On 24 August 2022, the average bitcoin transaction confirmation time was about 9.4 minutes, which is close to the average time between two blocks. However, the average bitcoin transaction confirmation time surged to about 45.6 minutes a year later on 24 August 2023, as reported by YCharts.

The main reason for this increased delay is the congestion in the bitcoin mempools. The emergence of bitcoin ordinals in January 2023 caused the number of bitcoin transactions to explode. 

For context, the seven-day moving average (7DMA) of the number of bitcoin transactions nearly doubled to about 492,350 on 23 August 2023 from 251,940 a year ago, data from The Block showed.

Mempools and Maximal Extractable Value (MEV)

We have to talk about MEV when we are talking about mempools.

MEV is the maximum profit that miners and validators can extract from a block. Miners and validators scout the mempool for transactions with high gas fees to prioritize when creating new blocks.

Interestingly, there are players other than validators and miners in the MEV game. A large portion of MEV is extracted by independent network participants referred to as “searchers”, who implement elaborate algorithms to detect MEV opportunities and use bots to automatically submit those transactions to the network. 

In frontrunning, searchers scout the mempool for pending transactions that can result in profitable trades. Once such a transaction is found, the searcher will copy the transaction and submit it with a higher gas fee so that the copycat transaction is executed before the original transaction.

In sandwich trading (or sandwich attacks), searchers look for large pending trades that are big enough to raise the price of the token. Once found, the searcher will buy the token before the large trade occurs and will immediately sell the tokens for a profit after the large trade.

Important Points to Remember About Mempools

  • Network congestion is a key reason why your transaction can get stuck in the mempool.
  • Setting low gas fees can result in your transaction getting stuck in the mempool.
  • Your transaction can get stuck in the mempool if the network hashrate is too low. Low hashrate indicates that the blockchain network may not have enough computational power to process transactions.
  • The time between two blocks differ between blockchains. Eg. the average time between two blocks is about 10 mins on bitcoin and 12 seconds on ethereum (ETH).
  • You can speed up your pending transaction by increasing gas fees.
  • Some users offer high gas fees to ensure that their transaction is processed at the earliest. This is common during highly sought-after NFT mints.
  • You can check the status of your transaction on Block Explorer applications like etherscan.

The Bottom Line

It is important to be aware of how mempools work. A crypto user is directly affected by the state of the mempool, whether it is through transaction confirmation time or gas fees.

Users also have to be aware of the evolving landscape of MEV and how members of the community are using mempools for their advantage.

Advertisements

Related Questions

Related Terms

Mensholong Lepcha
Crypto Specialist
Mensholong Lepcha
Crypto Specialist

Mensholong is a experienced crypto and blockchain journalist, now a full-time writer at Techopedia. He has contributed with news coverage and in-depth market analysis to Capital.com, StockTwits, XBO, and other publications. He began his writing career at Reuters in 2017, covering global equity markets. In his spare time, Mensholong enjoys watching soccer, finding new music, and buying BTC and ETH for his crypto portfolio.