Skip to main content

MEV, Demystified: How Value Moves Through Blockspace—and What You Can Do About It

· 11 min read
Dora Noda
Software Engineer

Maximal Extractable Value (MEV) is not just a trader’s bogeyman—it’s the economic engine quietly shaping how blocks get built, how wallets route orders, and how protocols design markets. Here’s a pragmatic guide for founders, engineers, traders, and validators.


TL;DR

  • What MEV is: Extra value a block producer (validator/sequencer) or their partners can extract by reordering, inserting, or excluding transactions beyond base rewards and gas.
  • Why it exists: Public mempools, deterministic execution, and transaction-order dependencies (e.g., AMM slippage) create profitable ordering games.
  • How modern MEV works: A supply chain—wallets & orderflow auctions → searchers → builders → relays → proposers—formalized by Proposer-Builder Separation (PBS) and MEV-Boost.
  • User protections today: Private transaction submission and Order Flow Auctions (OFAs) can reduce sandwich risk and share price improvement with users.
  • What’s next (as of September 2025): Enshrined PBS, inclusion lists, MEV-burn, SUAVE, and shared sequencers for L2s—all aimed at fairness and resilience.

The Five-Minute Mental Model

Think of blockspace as a scarce resource sold every 12 seconds on Ethereum. When you send a transaction, it lands in a public waiting area called the mempool. Some transactions, particularly DEX swaps, liquidations, and arbitrage opportunities, have ordering-dependent payoffs. Their outcome and profitability change based on where they land in a block relative to other transactions. This creates a high-stakes game for whoever controls the ordering.

The maximum potential profit from this game is Maximal Extractable Value (MEV). A clean, canonical definition is:

“The maximum value extractable from block production in excess of the standard block reward and gas fees by including, excluding, and changing the order of transactions.”

This phenomenon was first formalized in the 2019 academic paper “Flash Boys 2.0,” which documented the chaotic "priority gas auctions" (where bots would bid up gas fees to get their transaction included first) and highlighted the risks this posed to consensus stability.


A Quick Taxonomy (With Examples)

MEV isn't a single activity but a category of strategies. Here are the most common ones:

  • DEX Arbitrage (Backrunning): Imagine a large swap on Uniswap causes the price of ETH to drop relative to its price on Curve. An arbitrageur can buy the cheap ETH on Uniswap and sell it on Curve for an instant profit. This is a "backrun" because it happens immediately after the price-moving transaction. This form of MEV is generally considered beneficial as it helps keep prices consistent across markets.
  • Sandwiching: This is the most infamous and directly harmful form of MEV. An attacker spots a user's large buy order in the mempool. They frontrun the user by buying the same asset just before them, pushing the price up. The victim's trade then executes at this worse, higher price. The attacker then immediately backruns the victim by selling the asset, capturing the price difference. This exploits the user's specified slippage tolerance.
  • Liquidations: In lending protocols like Aave or Compound, positions become under-collateralized if the value of their collateral drops. These protocols offer a bonus to whoever is first to liquidate the position. This creates a race among bots to be the first to call the liquidation function and claim the reward.
  • NFT Mint “Gas Wars” (Legacy Pattern): In hyped NFT mints, a race ensues to secure a limited-supply token. Bots would compete fiercely for the earliest slots in a block, often bidding up gas prices to astronomical levels for the entire network.
  • Cross-Domain MEV: As activity fragments across Layer 1s, Layer 2s, and different rollups, opportunities arise to profit from price differences between these isolated environments. This is a rapidly growing and complex area of MEV extraction.

The Modern MEV Supply Chain (Post-Merge)

Before the Merge, miners controlled transaction ordering. Now, validators do. To prevent validators from becoming overly centralized and specialized, the Ethereum community developed Proposer-Builder Separation (PBS). This principle splits the job of proposing a block for the chain from the complex job of building the most profitable block.

In practice today, most validators use middleware called MEV-Boost. This software lets them outsource block building to a competitive market. The high-level flow looks like this:

  1. User/Wallet: A user initiates a transaction, either sending it to the public mempool or to a private RPC endpoint that offers protection.
  2. Searchers/Solvers: These are sophisticated actors who constantly monitor the mempool for MEV opportunities. They create "bundles" of transactions (e.g., a frontrun, a victim's trade, and a backrun) to capture this value.
  3. Builders: These are highly specialized entities that aggregate bundles from searchers and other transactions to construct the most profitable block possible. They compete against each other to create the highest-value block.
  4. Relays: These act as trusted middlemen. Builders submit their blocks to relays, which check them for validity and hide the contents from the proposer until it's signed. This prevents the proposer from stealing the builder's hard work.
  5. Proposer/Validator: The validator running MEV-Boost queries multiple relays and simply chooses the most profitable block header offered. They sign it blindly, without seeing the contents, and collect the payment from the winning builder.

While PBS has successfully broadened access to block building, it has also led to centralization among a small set of high-performance builders and relays. Recent studies show that a handful of builders produce the vast majority of blocks on Ethereum, which is an ongoing concern for the network's long-term decentralization and censorship resistance.


Why MEV Can Be Harmful

  • Direct User Cost: Sandwich attacks and other forms of frontrunning result in worse execution quality for users. You pay more for an asset or receive less than you should have, with the difference being captured by a searcher.
  • Consensus Risk: In extreme cases, MEV can threaten the stability of the blockchain itself. Before the Merge, "time-bandit" attacks were a theoretical concern where miners could be incentivized to re-organize the blockchain to capture a past MEV opportunity, undermining finality.
  • Market Structure Risk: The MEV supply chain can create powerful incumbents. Exclusive order flow deals between wallets and builders can create paywalls for user transactions, entrenching builder/relay oligopolies and threatening the core principles of neutrality and censorship resistance.

What Actually Works Today (Practical Mitigations)

You are not powerless against harmful MEV. A suite of tools and best practices has emerged to protect users and align the ecosystem.

For Users and Traders

  • Use a Private Submission Path: Services like Flashbots Protect offer a "protect" RPC endpoint for your wallet. Sending your transaction through it keeps it out of the public mempool, making it invisible to sandwich bots. Some services can even refund you a portion of the MEV extracted from your trade.
  • Prefer OFA-Backed Routers: Order Flow Auctions (OFAs) are a powerful defense. Instead of sending your swap to the mempool, routers like CoW Swap or UniswapX send your intent to a competitive marketplace of solvers. These solvers compete to give you the best possible price, effectively returning any potential MEV back to you as price improvement.
  • Tighten Slippage: For illiquid pairs, manually set a low slippage tolerance (e.g., 0.1%) to limit the maximum profit a sandwich attacker can extract. Breaking large trades into smaller chunks can also help.

For Wallets & Dapps

  • Integrate an OFA: By default, route user transactions through an Order Flow Auction. This is the most effective way to protect users from sandwich attacks and provide them with superior execution quality.
  • Offer Private RPC as Default: Make protected RPCs the default setting in your wallet or dapp. Allow power users to configure their builder and relay preferences to fine-tune the trade-off between privacy and inclusion speed.
  • Measure Execution Quality: Don't just assume your routing is optimal. Benchmark your execution against public mempool routing and quantify the price improvement gained from OFAs and private submission.

For Validators

  • Run MEV-Boost: Participate in the PBS market to maximize your staking rewards.
  • Diversify: Connect to a diverse set of relays and builders to avoid dependence on a single provider and enhance network resilience. Monitor your rewards and block inclusion rates to ensure you are well-connected.

L2s & the Rise of SEV (Sequencer Extractable Value)

Layer 2 rollups don't eliminate MEV; they just change its name. Rollups concentrate ordering power in a single entity called the sequencer, creating Sequencer Extractable Value (SEV). Empirical research shows that MEV is widespread on L2s, though often with lower profit margins than on L1.

To combat the centralization risk of a single sequencer per rollup, concepts like shared sequencers are emerging. These are decentralized marketplaces that allow multiple rollups to share a single, neutral entity for transaction ordering, aiming to arbitrate cross-rollup MEV more fairly.


What’s Coming Next (And Why It Matters)

The work to tame MEV is far from over. Several major protocol-level upgrades are on the horizon:

  • Enshrined PBS (ePBS): This aims to move Proposer-Builder Separation directly into the Ethereum protocol itself, reducing the reliance on trusted, centralized relays and hardening the network's security guarantees.
  • Inclusion Lists (EIP-7547): This proposal gives proposers a way to force a builder to include a specific set of transactions. It's a powerful tool to combat censorship, ensuring that even transactions with low fees can eventually make it onto the chain.
  • MEV-Burn: Similar to how EIP-1559 burns a portion of the base gas fee, MEV-burn proposes to burn a portion of builder payments. This would smooth out MEV revenue spikes, reduce incentives for destabilizing behavior, and redistribute value back to all ETH holders.
  • SUAVE (Single Unifying Auction for Value Expression): A project by Flashbots to create a decentralized, privacy-preserving auction layer for orderflow. The goal is to create a more open and fair market for block building and combat the trend toward exclusive, centralized deals.
  • OFA Standardization: As auctions become the norm, work is underway to create formal metrics and open tooling to quantify and compare the price improvement offered by different routers, raising the bar for execution quality across the entire ecosystem.

A Founder’s Checklist (Ship MEV-Aware Products)

  • Default to Privacy: Route user flow through private submission or encrypted intents-based systems.
  • Design for Auctions, Not Races: Avoid "first-come, first-served" mechanics that create latency games. Leverage batch auctions or OFAs to create fair and efficient markets.
  • Instrument Everything: Log slippage, effective price versus oracle price, and the opportunity cost of your routing decisions. Be transparent with your users about their execution quality.
  • Diversify Dependencies: Rely on multiple builders and relays today. Prepare your infrastructure for the transition to enshrined PBS tomorrow.
  • Plan for L2s: If you're building a multichain application, account for SEV and cross-domain MEV in your design.

Developer FAQ

  • Is MEV “bad” or “illegal”? MEV is an unavoidable byproduct of open, deterministic blockchain markets. Some forms, like arbitrage and liquidations, are essential for market efficiency. Others, like sandwiching, are purely extractive and harmful to users. The goal isn't to eliminate MEV but to design mechanisms that minimize the harm and align extraction with user benefit and network security. Its legal status is complex and varies by jurisdiction.
  • Does private transaction submission guarantee no sandwiches? It significantly reduces your exposure by keeping your transaction out of the public mempool where most bots are looking. When combined with an OFA, it's a very strong defense. However, no system is perfect, and guarantees depend on the specific policies of the private relay and builders you use.
  • Why not just “turn MEV off”? You can't. As long as there are on-chain markets with price inefficiencies (which is always), there will be profit in correcting them. Trying to eliminate it entirely would likely break useful economic functions. The more productive path is to manage and redistribute it through better mechanism design like ePBS, inclusion lists, and MEV-burn.

Further Reading

  • Canonical definition & overview: Ethereum.org—MEV docs
  • Origins & risks: Flash Boys 2.0 (Daian et al., 2019)
  • PBS/MEV-Boost primer: Flashbots docs and MEV-Boost in a Nutshell
  • OFA research: Uniswap Labs—Quantifying Price Improvement in Order Flow Auctions
  • ePBS & MEV-burn: Ethereum Research forum discussions
  • L2 MEV evidence: Empirical analyses across major rollups (e.g., "Analyzing the Extraction of MEV Across Layer-2 Rollups")

Bottom Line

MEV isn’t a glitch; it’s an incentive gradient inherent to blockchains. The winning approach is not denial—it’s mechanism design. The goal is to make value extraction contestable, transparent, and user-aligned. If you’re building, bake this awareness into your product from day one. If you’re trading, insist your tools do it for you. The ecosystem is rapidly converging on this more mature, resilient future—now is the time to design for it.