What is a Mempool?
The mempool (short for “memory pool”) is the waiting room for blockchain transactions. When you submit a transaction on Ethereum, Bitcoin, or most other blockchains, it doesn’t get included in a block immediately. Instead, it enters the mempool—a distributed collection of pending transactions held in the memory of network nodes. Validators (or miners, on PoW chains) select transactions from the mempool to include in the next block they produce, prioritizing transactions that offer the highest fees per unit of gas (Ethereum) or per byte (Bitcoin).
The mempool is not a single centralized queue. Every node maintains its own local mempool, and the contents can differ between nodes due to network propagation delays, filtering policies, and capacity limits. Nodes use gossip protocols to broadcast new transactions to their peers, who add them to their local mempools and continue propagating. When a node receives a new block, it removes all transactions included in that block from its local mempool and continues processing the remaining pending transactions.
Understanding mempool dynamics is essential for several practical reasons: (1) it determines how much you pay in gas fees (transactions with low fees can sit in the mempool for hours or days), (2) it creates opportunities for MEV (Miner Extractable Value) extraction, as bots scan the mempool for profitable transaction patterns, and (3) it affects transaction censorship, as block producers can choose to include or exclude specific transactions. During periods of high congestion (like NFT mints, major protocol launches, or market volatility), the mempool can swell to tens of thousands of pending transactions, driving fees to extreme levels.
How It Works
Transaction Lifecycle in the Mempool
-
Submission: A user signs a transaction and broadcasts it to the network via an RPC node. The transaction includes the sender, recipient, value, gas price (or EIP-1559 parameters), and calldata.
-
Validation: Each node that receives the transaction performs basic validation: is the signature valid? Does the sender have sufficient balance? Is the nonce correct? If validation passes, the node adds the transaction to its local mempool.
-
Propagation: The node gossips the transaction to its peers (typically 8–50 peers for Ethereum nodes). Peers repeat the validation and propagation process. Within seconds, the transaction is available to most of the network.
-
Selection: When a block producer creates a new block, it selects transactions from its local mempool. The selection strategy varies—on Ethereum with EIP-1559, the producer typically prioritizes transactions by “tip” (priority fee per gas unit), since the base fee is burned and doesn’t benefit the producer.
-
Inclusion or eviction: Once a transaction is included in a block, it is removed from all mempools. Transactions that remain unconfirmed for too long may be “dropped” from mempools due to capacity limits (Ethereum nodes typically cap their mempools at ~4,000–10,000 transactions or ~500 MB of data). Users must re-submit dropped transactions.
Gas Price Dynamics
On Ethereum (post EIP-1559), gas pricing follows a dual-fee model:
- Base fee: Burned, set algorithmically based on block congestion. Targets 50% fullness (15 million gas). If blocks are >50% full, the base fee increases by up to 12.5% per block. If <50% full, it decreases by up to 12.5% per block.
- Priority fee (“tip”): Paid to the block producer to incentivize inclusion. Set by the user. Typical values: 0.1–5 Gwei during quiet periods, 10–100+ Gwei during congestion.
The effective gas price = base_fee + priority_fee. This means that during low congestion, the base fee can drop to as low as 7 wei (practically free), while during peak congestion (like a major airdrop or NFT mint), it can spike to 100–500+ Gwei, making simple transfers cost $5–50+.
On Bitcoin, the mempool uses a fee-per-byte model. Transactions are prioritized by sat/vB (satoshis per virtual byte). During the 2021 bull market, fees spiked to 300–500 sat/vB (~$20–60 for a simple transaction) due to Ordinals (NFTs on Bitcoin) and BRC-20 token minting overwhelming the mempool.
MEV in the Mempool
The mempool is the primary hunting ground for MEV (Miner Extractable Value) bots. These bots monitor the mempool for specific transaction patterns and respond with their own transactions to extract value:
-
Sandwich attacks: An MEV bot detects a large swap on a DEX (e.g., someone buying $100K of a token on Uniswap). The bot front-runs the swap (buying the token first, pushing the price up), then back-runs it (selling after the target’s purchase pushes the price up further). The profit is the price difference extracted from the victim.
-
Just-in-time liquidity: Bots detect a pending swap on a DEX pool with low liquidity and provide liquidity just before the swap executes, earning the trading fee, then withdraw immediately after.
-
Arbitrage: Bots detect price differences between DEXes and submit transactions to capture the spread before others.
-
Liquidation bots: On lending protocols like Aave and Compound, bots monitor the mempool for borrowers approaching liquidation thresholds and compete to submit the liquidation transaction first, earning the liquidation bonus (typically 5%).
The scale of MEV extraction is enormous. Flashbots (the leading MEV infrastructure provider) reported over $680 million in MEV extracted on Ethereum from January 2020 to December 2023, with sandwich attacks alone accounting for over $200 million. Since the Merge (September 2022), MEV is extracted by searchers who bid for block space through builders (in the Proposer-Builder Separation architecture), not directly by validators.
Mempool Visualization Tools
Several tools allow users to monitor mempool conditions:
- Etherscan Gas Tracker: Shows current gas prices (low, average, fast) and estimated confirmation times
- Mempool.space: The gold standard for Bitcoin mempool visualization, showing pending transaction counts, fee percentiles, and projected confirmation times
- Flashbots Protect: An RPC endpoint that routes transactions through Flashbots’ private mempool, keeping them hidden from public MEV bots
- ** bloXroute**: A BDN (Block Distribution Network) that provides private transaction submission
Real-World Examples
The 2021 DeFi Summer mempool congestion was one of the most dramatic demonstrations of mempool dynamics. When Uniswap v3 launched in May 2021, the mempool filled with hundreds of thousands of transactions, pushing Ethereum gas prices to 500–1,000+ Gwei. Simple token transfers cost $20–50+, and complex DeFi interactions (like providing liquidity) cost hundreds of dollars. This event directly accelerated the development of L2 solutions.
The Ethereum Merge (September 15, 2022) changed how MEV interacts with the mempool. Post-Merge, validators cannot directly select transactions—they receive blocks from independent block builders who run MEV extraction algorithms. This Proposer-Builder Separation (PBS) means that validators (proposers) simply sell their block space to the highest-bidding builder, and builders compete to extract the most MEV. Flashbots’ MEV-Boost middleware processes ~90% of Ethereum blocks as of early 2025.
Bitcoin Ordinals (January 2023 onwards) created a new source of mempool congestion on Bitcoin. By inscribing data (NFTs, text, images) into Bitcoin transactions, Ordinals users created large transactions that consumed significant block space. During peak Ordinals activity, Bitcoin mempool fees spiked to 200–500 sat/vB, and the mempool backlog grew to over 400,000 unconfirmed transactions. This was a watershed moment for Bitcoin, as it demonstrated that demand for block space could exceed supply, creating fee markets similar to Ethereum.
Key Risks / Considerations
- Transaction replacement: On Ethereum, transactions can be replaced by sending a new transaction with the same nonce but a higher gas price. This is intended behavior (users can “speed up” stuck transactions) but can also be exploited by MEV bots (front-running via higher gas bids).
- Censorship: Block producers can choose to exclude specific transactions from their blocks. Post-Merge, this concern shifted from individual validators to block builders (who actually select transactions). Flashbots and other builders have been criticized for censoring Tornado Cash transactions following the OFAC sanctions in August 2022.
- Mempool dos attacks: Attackers can spam the network with low-fee transactions to fill mempools and slow down transaction propagation. This has been observed during gas wars and as a deliberate attack vector.
- Pending transaction risk: A transaction sitting in the mempool reveals the user’s intent to the network. MEV bots can act on this information before the transaction confirms. Private mempools (Flashbots, MEV Blocker) mitigate this by hiding pending transactions.
Comparison Table
| Feature | Ethereum Mempool | Bitcoin Mempool |
|---|---|---|
| Fee model | Base fee (burned) + priority fee | Fee per virtual byte (sat/vB) |
| Ordering priority | Priority fee per gas | Fee per byte |
| Mempool size limit | ~4,000–10,000 txs per node | ~100 MB default |
| Eviction policy | Oldest/lowest-fee first | Oldest/lowest-fee first |
| MEV impact | Extreme (DeFi) | Moderate (DEX, inscriptions) |
| Private mempool options | Flashbots, MEV Blocker | Limited |
| Average confirmation | 12 seconds | 10 minutes |
Frequently Asked Questions
Q: How long can a transaction stay in the mempool? A: On Ethereum, transactions typically remain in the mempool until they are included in a block or until the node evicts them due to capacity limits. Most nodes drop transactions after 5–10 minutes if they are below the current market rate. On Bitcoin, transactions with very low fees can sit in the mempool for days or weeks before being dropped (typically after 14 days).
Q: Can I cancel a pending transaction? A: You cannot directly cancel a transaction that has been broadcast to the network. However, you can send a replacement transaction (on Ethereum, with the same nonce and higher gas) that effectively overrides the pending one. On Ethereum, you can also send a zero-value transaction to yourself with the same nonce to effectively cancel the original.
Q: How do MEV bots see my transaction before it confirms? A: When you broadcast a transaction to the public mempool, every node on the network receives it. MEV bots run high-speed nodes that monitor the mempool in real-time and can submit competing transactions within milliseconds. To avoid this, you can use private mempool services like Flashbots Protect, which route your transaction directly to block builders without broadcasting it to the public mempool.
Q: What is a “gas war”? A: A gas war occurs when many users compete for block space at the same time, typically during high-demand events like NFT mints, token launches, or airdrop claims. Users bid up their gas prices to outbid each other, driving fees to extreme levels. The most infamous gas war was the Yuga Labs Otherside mint in April 2022, where users spent over $176 million in gas fees.