MEV (Maximal Extractable Value)

MEV (Maximal Extractable Value)

Profit extracted by reordering, inserting, or censoring transactions within a block beyond standard fees. Originally called "Miner Extractable Value" — renamed post-Merge when validators replaced miners. MEV is not a bug or an attack; it's an emergent property of public mempools and arbitrary transaction ordering.

Hundreds of millions of dollars are extracted annually. Most users pay for it in the form of worse execution prices without knowing it.

How It Works

Every Ethereum transaction sits in a public mempool before a block is built. Anyone watching the mempool can:

  • See pending transactions before they're confirmed
  • Submit their own transactions with higher gas fees to land before or after a target
  • Pay block builders directly (via MEV-Boost) to include transactions in specific positions

Block proposers have discretion over transaction ordering within a slot. That discretion has economic value, and MEV is the mechanism for extracting it.

Main Types

Arbitrage — the benign case. Two DEXs quote different prices for the same token. A searcher spots the discrepancy in the mempool (or detects it from a pending large trade that will move price), buys on the cheaper DEX, sells on the expensive one in the same block. Drives price convergence. Efficient but invisible to users.

Frontrunning — a pending transaction will move a price. A bot copies it with higher gas, landing before the original, then sells into the price impact. The original trader gets worse execution; the bot pockets the difference.

Sandwich attacks — a pending large swap is detected. The attacker places one buy ahead of it (pushing the price up), lets the victim's trade execute at the inflated price, then immediately sells (pushing the price back down). The victim buys high and the attacker captures the spread.

Liquidations — lending protocols like Aave reward whoever triggers an underwater liquidation first. Bots race to submit the liquidation transaction, often using flash loans to cover the repayment. Legitimate — it keeps the protocol solvent — but highly competitive and occasionally front-run among liquidators themselves.

Backrunning — no harm to the target. A bot submits a transaction immediately after a known event (a price update, a large swap) to capture residual value. Less extractive than sandwich or frontrunning.

Flashbots and MEV-Boost

Flashbots is the dominant MEV infrastructure. Two products matter:

MEV-Boost implements Proposer-Builder Separation (PBS): block builders (often professional searcher/builder firms) assemble blocks and bid for inclusion; block proposers (validators) select the highest-value block header without seeing the contents. This shifts MEV extraction away from validators toward a specialized builder market, while giving validators a cut of MEV revenue without running their own extraction operation. Over 90% of Ethereum blocks go through MEV-Boost at peak adoption.

Flashbots Protect is a private RPC endpoint users can route transactions through. Transactions bypass the public mempool entirely, going directly to Flashbots' block builder — invisible to frontrunning bots until the block is published. No extra fees; the privacy is the product.

MEV-Share

Flashbots' newer mechanism lets searchers share a portion of their MEV profit back with the users they're extracting from. Structured as hints: users opt-in to broadcasting partial transaction metadata (intent rather than calldata), searchers bid for inclusion, and the winning searcher returns a configured percentage to the user. The practical effect: a sandwich-resistant swap where the user captures some of the arbitrage upside rather than all of it going to the searcher.

Scale

  • Cumulative MEV extracted on Ethereum: >$1.5B since the Flashbots dashboard began tracking in 2021
  • Daily average ranges from $1M to $10M+ depending on market volatility
  • The largest single MEV extraction events happen during liquidation cascades — Black Thursday on Maker (March 2020) preceded the formal MEV infrastructure but saw millions extracted from chaotic block reordering

User Protection

Private RPCs: Flashbots Protect, MEV Blocker (CoW Protocol / Gnosis), BloXroute. Route transactions around the public mempool. Effective against frontrunning and sandwich; still expose to builder-level MEV.

CoW Protocol: batch auctions rather than individual transactions. All swaps in a batch are matched against each other first; only the net excess goes to external liquidity. Searchers can't frontrun individual orders because order execution happens at batch settlement, not block position.

1inch Fusion: intent-based trading. Users sign an order describing what they want; resolvers compete to fill it at the best price. No transaction in the public mempool until settlement.

TWAP orders: break large trades into many small pieces over time. Reduces the price impact any single transaction creates, lowering the MEV surface.

Related

defi-risks · stablecoins · flash-loans · amm · rollups · data-availability

Sources