MEV

Also known as: Maximal extractable value

On this page 7

MEV, short for maximal extractable value, is the additional profit that can be captured by including, excluding or reordering transactions within a block, beyond the standard block reward and gas fees. In smart contracts on public blockchains, MEV arises because transaction order is decided by whoever builds the block, and many contract outcomes, such as a swap price or a liquidation, depend directly on that order.

The term originally stood for miner extractable value under proof of work. After Ethereum moved to proof of stake, the name changed to maximal extractable value, because the opportunity now belongs to validators, block builders and searchers rather than miners. For anyone working in crypto & blockchain, MEV is a structural property of open transaction pools, not a bug in a single contract.

How MEV is created and captured

MEV is created whenever the state change of one transaction alters the value of another. A pending trade on an automated market maker moves the pool price, a falling oracle price makes a loan eligible for liquidation, and two exchanges briefly quote different prices for the same token. Each event leaves a profit opportunity for whoever controls ordering in the next block.

Pending transactions usually wait in the public mempool, where anyone can read them before confirmation. Specialized bots called searchers simulate these transactions, find profitable sequences and submit bundles of their own transactions positioned before or after the target. Searchers then compete by paying a large share of the profit to the block producer as a priority fee or direct payment.

The value chain has several distinct roles. The table below shows who participates in MEV extraction on Ethereum and what each role contributes.

RoleMain activitySource of income
SearcherDetects opportunities and builds bundlesArbitrage or liquidation profit
Block builderAssembles the most valuable blockMargin between bids and payment to proposer
RelayPasses blocks from builders to proposersUsually none or service agreements
Validator (proposer)Signs and proposes the chosen blockBuilder payment plus consensus rewards
UserSubmits the original transactionBears the cost through worse execution
Participants in the MEV supply chain

Main types of MEV strategies

MEV strategies differ sharply in their effect on users. Some activity is broadly neutral or beneficial, because it keeps prices aligned and loans solvent, while other strategies transfer value directly from ordinary traders to the extractor.

The following table compares the most common strategies, how they work and how they affect other participants.

StrategyMechanismEffect on users
DEX arbitrageBuys on one exchange and sells on another in one blockAligns prices, mostly neutral
LiquidationRepays an undercollateralized loan for a bonusKeeps lending protocols solvent
Sandwich attackTrades before and after a victim swapVictim receives a worse price
Front-runningCopies or preempts a profitable pending transactionOriginal sender loses the opportunity
Back-runningTrades immediately after a large price moveUsually neutral
Time-bandit attackReorganizes past blocks to capture old MEVThreatens consensus stability
Common MEV strategies and their impact

The sandwich attack is the most visible harmful form. A searcher sees a large swap with a generous slippage tolerance, buys the same asset first to push the price up, lets the victim trade at that inflated price and then sells. The profit equals roughly the price impact the victim absorbed, minus gas and builder payments.

MEV is a broader category than several terms often used as synonyms. Front-running is one specific technique within MEV, and gas fees are the competitive price paid to secure ordering rather than the value itself. The comparison below clarifies these boundaries.

ConceptScopeRelation to MEV
MEVAll value from transaction orderingThe overall category
Front-runningActing before a known pending transactionOne MEV technique
Gas feePayment for computation and inclusionTool used to bid for position
SlippageDifference between expected and executed priceThe margin sandwich attacks exploit
Reentrancy attackExploit of flawed contract logicNot MEV, because it needs a code bug
How MEV differs from neighboring terms

A useful rule is that MEV requires no flaw in contract code. It exploits public information and ordering rights, so even a perfectly audited contract can leak value if its design exposes predictable price movements to observers.

Infrastructure that shapes MEV today

Before 2020, searchers competed through priority gas auctions, repeatedly raising fees in the public mempool. These auctions congested the network and wasted block space on failed transactions. The response was off-chain auction infrastructure that lets searchers bid privately for inclusion.

On Ethereum, proposer-builder separation is implemented today mostly through the out-of-protocol software MEV-Boost. Validators outsource block construction to a competitive builder market and simply choose the highest-paying block. This design spreads MEV revenue to all validators, including small ones, but it has concentrated block building among a small number of builders, which raises censorship and centralization concerns.

Other mitigations target users directly. Private transaction relays hide trades from the public mempool, MEV-share schemes return part of the back-running profit to the user, and batch auctions settle many orders at a single uniform price so that ordering inside the batch has no value. Research into encrypted mempools and enshrined proposer-builder separation continues, and none of these approaches eliminates MEV completely.

Designing contracts and transactions to limit MEV

Developers and users can reduce exposure, although some MEV is unavoidable wherever ordering matters. The decision table below summarizes practical responses to typical situations.

SituationRecommended measureReason
Large swap on an AMMTight slippage limit and private relayRemoves the sandwich margin
Order-sensitive protocol logicCommit-reveal or batch settlementHides intent until ordering is fixed
Oracle-dependent liquidationsAuction liquidation bonusesReturns value to the protocol
Token launch or mintFair ordering or randomized allocationPrevents bot capture of supply
Price-sensitive governance actionTime delay and announcementReduces surprise arbitrage
Practical measures against harmful MEV

A common mistake is setting a very high slippage tolerance to avoid failed transactions, which effectively invites a sandwich attack. Another is assuming that a layer 2 network is immune: rollups with a centralized sequencer shift ordering power to that sequencer, so the MEV risk changes form rather than disappearing.

In everyday language

Imagine a public notice board where everyone pins their orders before a clerk processes them in a batch. The clerk, or anyone who can pay the clerk, can read the orders and decide which one goes first. MEV is the money made from that power to choose the order.

Sometimes that power does useful work, such as fixing a price difference between two shops. Sometimes it hurts people, for example when someone sees your large purchase, buys just before you and sells to you at a higher price. The key lesson is that on a public blockchain, a pending transaction is visible, and visible intentions can be exploited.

Seen in the real world

A trader on Ethereum submits a swap of 200,000 stablecoins for ether on a popular automated market maker, with the wallet’s slippage tolerance set to 3 percent. A searcher bot detects the transaction in the public mempool within milliseconds and builds a sandwich bundle: a purchase of ether before the trade and a sale right after it.

The builder includes the bundle because the searcher offers most of its profit as payment. The trader still receives ether, but at a price about 1.5 percent worse than quoted, a loss of roughly 3,000 dollars. On the next large swap, the trader routes the order through a private relay with a 0.3 percent limit, and the trade settles at the quoted price with no sandwich exposure.