This essay was originally published on Bankless.
Every pending Ethereum transaction invisibly competes in the mempool to be confirmed.
While the mempool is a critical piece of blockchain infrastructure, many (most?) people have little understanding of how the mempool game works – or how the rules can be used against your best interests.
Are you waiting for your transaction to confirm? That’s the mempool.
Are you priced out by high gas fees? That’s the mempool too.
Are you frustrated by a stuck transaction that has blocked your wallet? Yep…the mempool.
Are you confused by automated bots instantly exploiting arbitrage opportunities? Yeah. You get the idea.
Fortunately, over the past few months, the mempool has started to come out of the shadows.
The industry is beginning to share compelling tales that describe the hidden world of mempool competition. A sampling of worthwhile reads include:
These narratives illustrate how the mempool can be mysterious, confounding, and even downright dangerous. Until recently, going hands-on with mempool data has been out-of-reach for all but the most sophisticated and well-financed teams.
Hence the Blocknative team is excited to help show the Bankless Nation why the mempool matters. We will introduce the core concepts, then explore the implications for traders and builders, and wrap up with some new, easy-to-use tooling for you to go hands-on with real-time mempool data.
The mempool: a competitive marketplace for confirmation
The mempool is a competitive game where winning gets your transaction confirmed as quickly as possible at the lowest fee. When you approve and sign a transaction, it enters the mempool — and joins tens of thousands of other pending transactions that are jockeying for precious block space.
In other words, the game is on for your transaction to get confirmed and go on-chain.
But the gas price is set before your transaction enters the mempool. The higher the gas price, the higher the miner incentive to include your transaction in the next block, making the mempool a first-price auction. As a result, the mempool is neither a static nor a benign environment but instead a highly dynamic – perhaps even chaotic – system.
This effectively makes the mempool a real-time marketplace for on-chain confirmation and settlement. In this marketplace, your transaction competes shoulder-to-shoulder with thousands of other transactions for miner attention.
Know the rules of competition
To help you compete, here are some of the 5 core concepts that combine to form the rules of the mempool marketplace:
1. Each node has its own version
By definition, the mempool is pre-consensus. That means that each node in the network has its own unique version of the mempool. Getting your arms around the entire mempool on your own can be next to impossible.
2. It’s open & public
Mempool data is open and publicly available to the entire network. So ‘everyone’ can see each of your transactions as they are happening. But you can also see everyone else’s transactions before they go on-chain.
3. It’s mutable
Because the mempool is pre-consensus, it is mutable. This means that pending transactions can be overwritten with replacement transactions, including Speed Ups and Cancels. Replacement transactions are critical tools for winning mempool competitions – or bowing out if conditions become unfavorable.
4. Transactions can get dropped
Network congestion can cause rapid increases in gas prices, making some pending transactions no longer competitive. Given that many nodes on the network have limited memory resources, uncompetitive transactions may be dropped by miner nodes in particular. If your transaction gets dropped, it disappears from large sections of the mempool. Further, detecting that your transaction has been dropped is difficult without complex infrastructure.
5. Transactions can get stuck
Dropped transactions can create nonce gaps, which then create stuck transactions. Stuck transactions will ‘freeze’ any further transactions from your wallet being confirmed until the nonce gap is resolved.
As you can see, the rules of the mempool are surprisingly complicated – and often interact with each other in unexpected ways. Against this backdrop, it is no surprise that the mempool is now frequently characterized as a Dark Forest.
New tools that make you more competitive
Blocknative is committed to democratizing access to mempool data and providing next-generation tools to make this data easy to act on. We recently introduced a net-new interface for working with streaming transaction data called Mempool Explorer.
Mempool Explorer is designed to help level the playing field for builders and traders just like you — everyone should have access to the data.
Once you have mastered the basics, you can:
Detect whenever liquidity begins to move in or out of a specific protocol.
Track top DEXs to monitor pending buy/sell trends.
Monitor the latest yield farming project to gauge momentum – and insider activity.
While the mempool can be a confusing and even scary place, it doesn’t have to be. Blocknative’s goal is to make mempool data accessible and easy to work with.
Read our favorites pieces on the Mempool
Master the Mempool today.
Blocknative's proven & powerful enterprise-grade infrastructure makes it easy for builders and traders to work with mempool data.Start for free