What Is MEV (Maximal Extractable Value)?

Understand Maximal Extractable Value (MEV): how block producers and searchers extract value through transaction ordering, front-running, sandwich attacks, and what it means for DeFi users.

What Is MEV (Maximal Extractable Value)?

Maximal Extractable Value, commonly known as MEV, is the profit that can be extracted by block producers and specialized actors by manipulating the order, inclusion, or exclusion of transactions within a block. Originally called "Miner Extractable Value" when Ethereum used proof-of-work, the concept was renamed after the merge to proof-of-stake, since validators now fill the role that miners once held.

MEV is sometimes called the "invisible tax" on DeFi users. Every swap, every loan, every liquidation is potentially subject to value extraction by parties who can see and reorder pending transactions before they are confirmed.

How MEV Works

The Mempool and Transaction Ordering

When you submit a transaction on Ethereum or another blockchain, it enters the mempool — a waiting area for unconfirmed transactions. Traditionally, block producers ordered transactions by gas price: higher gas, higher priority. This created an auction where anyone willing to pay more could get their transaction included first.

MEV arises because the order in which transactions execute within a block matters enormously. If a searcher knows a large swap is about to move the price on a DEX, they can position their own transactions before and after that swap to extract profit.

The MEV Supply Chain

Modern MEV extraction (particularly on Ethereum post-merge) involves a specialized supply chain:

  1. Searchers: Sophisticated actors who monitor the mempool and simulate transaction outcomes. They identify profitable MEV opportunities and construct transaction bundles.
  2. Builders: Entities that assemble full blocks from searcher bundles and regular transactions, optimizing for maximum value.
  3. Validators (Proposers): Block producers who select the most profitable block from builders and propose it to the network.
  4. Relays: Trusted intermediaries that pass blocks between builders and validators, preventing validators from stealing MEV by inspecting block contents early.

This architecture — formalized by Flashbots through MEV-Boost — separates the roles of finding MEV, assembling blocks, and proposing blocks. It reduces centralization risks but does not eliminate MEV itself.

Types of MEV

Front-Running

Front-running is the most widely known form of MEV. A searcher observes a pending transaction — say, a large buy order on Uniswap — and places their own buy transaction ahead of it with a higher gas fee. The original transaction then executes at a worse price, and the front-runner profits from the price movement they anticipated.

In traditional finance, front-running is illegal. In the permissionless world of DeFi, there is no regulatory framework preventing it — though protocol-level and infrastructure-level solutions are emerging.

Sandwich Attacks

A sandwich attack combines front-running and back-running into a single strategy:

  1. Front-run: The attacker buys the target token before the victim's swap, pushing the price up.
  2. Victim's trade: Executes at a worse price than expected due to the artificial price impact.
  3. Back-run: The attacker sells immediately after, capturing the price difference.

The attacker "sandwiches" the victim's transaction between their own. The victim receives fewer tokens and experiences worse execution quality. Sandwich attacks are one of the most common and most extractive forms of MEV, estimated to cost DeFi users hundreds of millions of dollars annually.

Liquidation MEV

In DeFi lending protocols — including those aggregated by Borrow — positions that fall below their required collateral ratio become eligible for liquidation. Liquidators repay a portion of the borrower's debt and receive collateral at a discount (the liquidation bonus).

Searchers compete intensely to execute these liquidations, as the liquidation bonus represents a guaranteed profit. This competition plays out through gas price auctions or through the builder/searcher pipeline. While liquidation MEV can be extractive (searchers capture value that could go to borrowers or protocols), it serves a critical function: keeping lending protocols solvent.

Arbitrage

Arbitrage MEV involves profiting from price discrepancies across DEXs. If ETH is trading at $3,000 on Uniswap and $3,005 on Curve, a searcher can buy on Uniswap and sell on Curve simultaneously. This is often funded using flash loans, making it capital-efficient.

Unlike front-running and sandwich attacks, arbitrage MEV is generally considered beneficial because it equalizes prices across venues, improving market efficiency for all participants.

JIT (Just-in-Time) Liquidity

A more sophisticated MEV strategy where a searcher observes a large pending swap and provides concentrated liquidity to the AMM pool just for that transaction's execution range, earning swap fees. The liquidity is added in the same block, just before the swap, and removed just after. This improves execution for the swapper but captures fee revenue that would otherwise go to passive LPs.

The Scale of MEV

MEV is not a theoretical concern — it is a multi-billion dollar phenomenon:

  • Cumulative MEV on Ethereum has exceeded $600 million in extracted value since the Flashbots MEV-Explore dashboard began tracking.
  • Daily MEV extraction routinely exceeds $1 million on Ethereum mainnet alone.
  • Cross-domain MEV — extraction across L2s, sidechains, and alternative L1s — is growing as DeFi expands multi-chain.

These figures likely underestimate the true scope, as sophisticated MEV strategies are increasingly difficult to detect on-chain.

How MEV Affects DeFi Users

Worse Execution on Swaps

If you are trading on a DEX, MEV searchers may front-run or sandwich your transaction, causing you to receive fewer tokens than the quoted amount. Slippage settings provide some protection, but a tight slippage tolerance can cause transactions to fail, while a loose tolerance invites more extraction.

Liquidation Costs

When using collateralized borrowing platforms — like those integrated with Borrow — MEV searchers compete to liquidate your position the moment it becomes eligible. The speed and aggression of MEV searchers means you have very little time to add collateral or repay debt once your position approaches the liquidation threshold.

Higher Gas Costs

MEV competition historically drove up gas fees for all users, as searchers bid aggressively for transaction priority. The Flashbots ecosystem and MEV-Boost have reduced this externality by moving the auction off-chain, but gas costs remain elevated during high-MEV periods.

Failed Transactions

Users sometimes pay gas for transactions that fail because a searcher front-ran them or because the on-chain state changed before their transaction was included. This is particularly frustrating during high-volatility periods when MEV activity spikes.

Protecting Yourself from MEV

MEV-Protected RPC Endpoints

The most effective protection for regular users is routing transactions through MEV-protected RPC endpoints rather than the public mempool:

  • Flashbots Protect: Sends transactions directly to builders, bypassing the public mempool entirely. Transactions cannot be seen or front-run by searchers monitoring the mempool.
  • MEV Blocker: A similar service backed by multiple searchers who commit to not extracting MEV from transactions routed through it.
  • Wallet-integrated protection: Wallets like MetaMask are beginning to integrate MEV protection by default.

Slippage and Limit Orders

Setting appropriate slippage tolerances on swaps limits the amount of value a sandwich attacker can extract. Using limit orders instead of market swaps eliminates front-running risk entirely, as the order only executes at your specified price.

Protocol-Level Protection

Some DeFi protocols implement MEV protection directly:

  • Batch auctions: Protocols like CowSwap execute trades in batches at uniform clearing prices, eliminating ordering advantages.
  • Encrypted mempools: Threshold encryption schemes that hide transaction details until the block is committed.
  • Frequent batch auctions for liquidations: Protocols that auction liquidation rights in batches rather than on a first-come, first-served basis.

MEV and Ethereum's Architecture

MEV-Boost and Proposer-Builder Separation

Ethereum's current MEV architecture relies on Proposer-Builder Separation (PBS) implemented through MEV-Boost:

  • Builders construct blocks that maximize total value (fees + MEV).
  • Relays verify block validity and pass sealed blocks to validators.
  • Proposers (validators) select the most valuable block without seeing its contents, preventing them from stealing MEV.

Over 90% of Ethereum blocks are now produced through MEV-Boost, making it a de facto part of Ethereum's block production pipeline.

Enshrined PBS

Ethereum's roadmap includes enshrined PBS — building proposer-builder separation into the protocol itself rather than relying on external infrastructure like MEV-Boost. This would reduce trust assumptions and centralization risks in the current relay system.

MEV on Layer 2s

Layer 2 scaling solutions have their own MEV dynamics. Currently, most L2 sequencers are centralized, meaning the sequencer operator could theoretically extract MEV. As L2s decentralize their sequencers, MEV competition will emerge on these networks as well, likely with different dynamics than on L1.

MEV in the Context of Borrowing

For users of lending platforms like Borrow, MEV manifests primarily through liquidation dynamics. Understanding these dynamics helps you manage risk:

  • Liquidation speed: MEV searchers monitor every block for liquidatable positions. Once your health factor drops below 1, liquidation can happen within seconds.
  • Liquidation bonus competition: Searchers are willing to pay significant gas to capture liquidation bonuses, which means liquidations happen efficiently — good for protocol health, but it leaves little margin for borrowers.
  • Oracle front-running: Some MEV strategies involve acting on oracle price updates before they propagate, which can trigger or avoid liquidations in ways that disadvantage other participants.

When using Borrow to manage your collateralized positions, maintaining a healthy buffer above the liquidation threshold is the best defense against MEV-driven liquidation. The platform helps you monitor positions across multiple protocols, giving you visibility into your risk exposure.

The Philosophical Debate Around MEV

MEV raises fundamental questions about fairness in decentralized systems:

  • Is MEV an inherent property of blockchains? Many researchers argue yes — any system with public transaction ordering will have MEV. The question is not whether MEV exists but how it is distributed.
  • Should MEV be minimized or redistributed? Some advocate for protocols that minimize total MEV; others argue for mechanisms that return extracted value to users (MEV refunds).
  • Does MEV undermine decentralization? The economies of scale in MEV extraction tend toward centralization of builders and searchers, which some see as a threat to blockchain neutrality.

Key Takeaways

MEV is a fundamental feature of public blockchains — not a bug, but an emergent property of systems where transaction ordering carries economic value. As a DeFi user, understanding MEV helps you protect yourself through MEV-resistant tools, appropriate slippage settings, and awareness of how front-running and sandwich attacks operate.

For borrowers using platforms like Borrow, MEV primarily impacts liquidation dynamics. Keeping your collateral ratio healthy and monitoring positions across protocols is the most practical defense. The broader DeFi ecosystem continues to evolve solutions — from Flashbots Protect to enshrined PBS — that aim to reduce the extractive impact of MEV while preserving its market-efficiency benefits.

Common Questions

MEV stands for Maximal Extractable Value (originally Miner Extractable Value before Ethereum moved to proof-of-stake). It refers to the profit that block producers — validators or miners — and specialized searchers can extract by including, excluding, or reordering transactions within a block beyond the standard block reward and gas fees.

Related Questions