MEV (Maximal Extractable Value)
The profit available by reordering, inserting, or censoring transactions within a block, extracted by validators and searchers.
Key Takeaways
- Maximal Extractable Value (MEV) is the profit that block producers can capture by manipulating transaction ordering within a block. Originally called "Miner Extractable Value," the term was broadened after Ethereum moved to proof-of-stake in 2022.
- MEV manifests through strategies like DEX arbitrage, liquidations, frontrunning, and sandwich attacks: collectively extracting billions of dollars from users across Ethereum and other chains.
- Bitcoin's Lightning Network naturally avoids MEV because payments settle off-chain in private channels with no public mempool for observers to exploit.
What Is MEV?
Maximal Extractable Value (MEV) refers to the maximum profit that can be extracted from block production beyond the standard block reward and gas fees by including, excluding, or reordering transactions within a block. Anyone who controls transaction sequencing: validators, miners, or specialized actors called "searchers": can capture MEV at the expense of ordinary users.
The concept was first formally described by Phil Daian and collaborators in the 2019 research paper Flash Boys 2.0: Frontrunning, Transaction Reordering, and Consensus Instability in Decentralized Exchanges. The paper revealed that bots were already systematically extracting value from decentralized exchange (DEX) users by monitoring the public mempool and manipulating transaction order. Daian went on to co-found Flashbots, the organization that now provides the infrastructure underpinning most MEV extraction and protection on Ethereum.
MEV is sometimes called an "invisible tax" on blockchain users. Unlike explicit transaction fees, MEV extraction is hidden: users receive worse prices on trades, pay higher costs for liquidations, or see their transactions delayed without understanding why.
How It Works
MEV exists because blockchains process transactions in ordered batches (blocks), and whoever builds the block decides the ordering. On Ethereum, pending transactions sit in a public mempool visible to everyone. Specialized bots scan this mempool continuously, identify profitable ordering opportunities, and submit their own transactions designed to extract that value.
Types of MEV
MEV strategies fall along a spectrum from beneficial to harmful:
- DEX arbitrage: bots buy tokens at a lower price on one exchange and sell at a higher price on another within a single transaction. This is generally considered beneficial because it equalizes prices across markets.
- Liquidations: when borrowers on lending protocols like Aave or Compound fall below their collateralization threshold, bots race to liquidate positions and collect the liquidation bonus. While aggressive, this activity keeps lending protocols solvent.
- Frontrunning: a bot copies a profitable pending transaction and submits it with a higher gas fee to execute first. The original user either receives a worse price or has their opportunity stolen entirely.
- Sandwich attacks: a bot detects a large pending swap, buys the same token just before the victim's trade (pushing the price up), lets the victim buy at the inflated price, then sells immediately after. The victim receives fewer tokens while the attacker pockets the difference.
- Backrunning: a bot places its transaction immediately after a target transaction to capture resulting arbitrage. This is considered the least harmful form because the original user's trade executes at the expected price.
The MEV Supply Chain
MEV extraction on Ethereum operates through a specialized supply chain with four key actors:
- Searchers scan the mempool and identify MEV opportunities. They construct optimized transaction bundles and submit sealed-price bids to builders. Competition is intense: searchers often pay over 90% of extracted value in fees to get their bundles included.
- Builders receive transactions from the public mempool, private order flow channels, and searcher bundles. They assemble complete blocks optimized for maximum revenue. The market is highly concentrated: roughly 80% of Ethereum blocks are built by just two entities.
- Relays serve as trusted intermediaries between builders and proposers. They validate blocks, select the highest-bid block, and forward only the winning block header to the proposer.
- Proposers (validators) receive sealed block headers from relays, select the one with the highest bid, and sign the block for inclusion in the chain. Under proposer-builder separation, validators no longer need to build blocks themselves.
Approximately 96% of all Ethereum blocks are now produced through this MEV-Boost relay system, with MEV-Boost blocks averaging 5.5x more value than locally built blocks.
A Sandwich Attack Step by Step
To illustrate how MEV extraction works in practice, consider a sandwich attack on a DEX swap:
1. Alice submits a swap: 10 ETH → USDC on Uniswap
(visible in the public mempool with max slippage of 1%)
2. Bot detects Alice's pending transaction
Calculates: buying USDC before Alice will move the price
3. Bot frontrun: buys USDC with 5 ETH at the current price
(submitted with higher gas fee to execute before Alice)
4. Alice's swap executes at a worse price
(the bot's purchase already moved the price up)
5. Bot backrun: sells USDC immediately after Alice
(captures the price difference as profit)
Result: Alice receives fewer USDC than expected
Bot profits from the price manipulationData from EigenPhi shows that roughly 1.2% of all DEX trades on Ethereum are sandwiched, with victims losing an average of 0.41% of their trade value. In 2025, sandwich attacks accounted for over 50% of total MEV transaction volume on Ethereum.
The Flashbots Ecosystem
Flashbots emerged as the primary infrastructure for managing MEV on Ethereum. Rather than eliminating MEV entirely (which may be impossible on a transparent blockchain), Flashbots aims to democratize access and minimize harmful extraction.
- MEV-Boost: an open-source sidecar that validators run to outsource block building. It implements proposer-builder separation off-chain, allowing specialized builders to compete for block construction.
- Flashbots Protect: a private RPC endpoint that users configure in their wallet. Transactions bypass the public mempool, preventing frontrunning and sandwich attacks. As of late 2024, it had served over 2.1 million unique wallets and protected $43 billion in DEX volume.
- BuilderNet: a decentralized block builder using Trusted Execution Environments (TEEs), jointly operated by Flashbots, Beaverbuild, and Nethermind. By early 2026, BuilderNet produced roughly 25% of all Ethereum blocks.
- SUAVE (Single Unifying Auction for Value Expression): Flashbots' long-term vision for a decentralized, cross-chain MEV management layer where users submit preferences rather than specific transactions.
MEV Protection Strategies
Several approaches help users protect themselves from harmful MEV extraction:
- Private transaction submission: services like Flashbots Protect and MEV Blocker route transactions through private channels instead of the public mempool, hiding them from sandwich bots.
- Order flow auctions: MEV Blocker (by CoW Protocol) auctions the right to backrun user transactions, with winning bid value returned to users as rebates. Over 4.5 million wallets use this service, receiving over 6,100 ETH in cumulative rebates.
- Batch auctions: protocols like CoW Swap match orders peer-to-peer in batches before sending them on-chain, reducing the window for MEV extraction.
- Slippage limits: setting tight slippage tolerance on swaps reduces the profit margin available to sandwich attackers, though it may cause trades to fail in volatile markets.
- Encrypted mempools: an emerging solution where transactions are encrypted until block finality, eliminating the frontrunning window entirely. Shutter Network has deployed early implementations on Gnosis Chain.
MEV on Bitcoin
MEV on Bitcoin is rare compared to Ethereum. Bitcoin's scripting language is deliberately limited, so the complex smart contract interactions that enable DeFi MEV on Ethereum (automated market makers, lending protocols, flash loans) do not exist on Bitcoin's base layer. Miners order transactions primarily by fee rate, and most transactions are simple value transfers with no profitable reordering opportunities.
However, this is changing at the margins. The emergence of Ordinals and Runes has introduced NFT-like and token-like activity to Bitcoin, expanding the potential MEV surface area. Miners could theoretically frontrun high-value inscription transactions or reorder Runes mints. The time-bandit attack (where miners reorganize recent blocks to capture past MEV) remains a theoretical concern for any proof-of-work chain.
Why Lightning Avoids MEV
The Lightning Network is structurally immune to MEV for several reasons:
- Off-chain settlement: payments travel through private channels between participants. There is no public mempool where bots can observe pending transactions and plan extraction strategies.
- No block producer ordering: within a channel, payments are bilateral agreements between the two parties. No third party controls transaction sequencing.
- Atomic routing: multi-hop payments use HTLCs with decrementing timelocks. The entire payment either succeeds or fails atomically, preventing intermediary nodes from selectively manipulating parts of the payment path.
- Onion routing: each node in a payment path only knows its immediate predecessor and successor. Routing nodes cannot see the full payment details, limiting their ability to extract value.
This MEV resistance is a fundamental advantage of off-chain payment networks. Layer 2 solutions like Spark inherit this property: by moving transactions off the base layer, they eliminate the public ordering mechanism that MEV depends on. For a broader comparison of Bitcoin scaling approaches, see the Bitcoin Layer 2 comparison.
Why It Matters
MEV has profound implications for blockchain usability, fairness, and security:
- User cost: MEV functions as a hidden tax. Ethereum users collectively lose tens of millions of dollars annually to sandwich attacks and frontrunning alone, on top of explicit gas fees.
- Centralization pressure: the MEV supply chain concentrates power. When 80% of blocks are built by two entities, the decentralization promises of blockchain technology come under strain. Enshrined proposer-builder separation aims to address this but may amplify builder concentration in the short term.
- Consensus stability: in extreme cases, MEV can threaten consensus itself. If the value of reordering past blocks exceeds the block reward, rational validators might attempt chain reorganizations to capture that value.
- Design motivation: the existence of MEV has shaped blockchain architecture decisions. It is one reason why off-chain and Layer 2 solutions are increasingly favored for payment and DeFi applications: they remove the public transaction ordering that makes MEV possible.
Risks and Considerations
The Centralizing Effect
MEV creates economies of scale. Searchers with better algorithms, lower latency, and proprietary data win more opportunities. Builders with exclusive order flow produce more valuable blocks. This flywheel effect concentrates the block building market, undermining the decentralization that blockchain systems are designed to provide.
MEV Cannot Be Fully Eliminated
As long as someone must order transactions, the ability to profit from that ordering exists. Even encrypted mempools only delay the information advantage: once transactions are decrypted for execution, short-term MEV opportunities remain. Solutions focus on minimizing harmful MEV (sandwich attacks, frontrunning) while accepting beneficial MEV (arbitrage that improves price discovery).
Cross-Chain MEV
As blockchains become more interconnected through rollups and bridges, cross-domain MEV is emerging. Searchers can exploit price differences across chains or between Layer 1 and Layer 2 in ways that are harder to detect and mitigate. This expanding attack surface is an active area of research.
Regulatory Uncertainty
Whether MEV extraction constitutes market manipulation under existing financial regulations remains an open question. In traditional finance, frontrunning is illegal. On blockchains, the line between legitimate arbitrage and harmful extraction is blurry, and regulators are still developing frameworks to address it.
This glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.