Skip to content

What is MEV? Maximal extractable value, sandwich trades and how they affect you

What maximal extractable value (MEV) is, who captures it, arbitrage and sandwich trades, how it can worsen your price, and what PBS and MEV-Boost change.

Figures checked against 3 official and primary sources on . See the sources · How we check

Key points

  • MEV is the extra value that can be taken from producing a block by including, excluding or reordering transactions, on top of the normal block reward and fees.
  • Much of it is captured by searchers: bots that look for profitable opportunities and pay fees to get their transactions in the right place.
  • Some MEV is harmless or even useful, like arbitrage between exchanges. Sandwich trades are the type that hurts ordinary users, through worse prices.
  • On Ethereum, proposer-builder separation and MEV-Boost change who builds blocks, to stop MEV pulling the network toward centralization.
In this guide
  1. What MEV is
  2. Who captures it
  3. The main strategies
  4. How sandwich trades cost you
  5. Effects on the whole network
  6. What Ethereum has changed
  7. Protecting your own trades

When you send a trade to a decentralized exchange, it doesn’t execute the instant you click. It waits to be included in a block, and the order of transactions in that block can be worth money. Maximal extractable value, or MEV, is the name for that value, and some of it comes out of the pockets of ordinary traders.

This guide explains MEV using ethereum.org’s documentation: what it is, who captures it, the main strategies, how it can affect your trades, and what Ethereum has changed in response. For the basics of decentralized exchanges, see CEX vs DEX.

What MEV is

ethereum.org defines MEV as the maximum value that can be extracted from block production in excess of the standard block reward and gas fees, by including, excluding and changing the order of transactions in a block.

The name has changed over time. It was first miner extractable value, from Ethereum’s proof-of-work era. After The Merge, validators decide which transactions go in a block and in what order, so “maximal” replaced “miner”. See proof of work vs proof of stake.

Who captures it

In theory, whoever produces the block could capture all of it. In practice, ethereum.org explains, much of the work is done by searchers: independent participants who run algorithms to spot profitable opportunities and submit transactions through bots.

Searchers compete for the same opportunities, so they’re willing to pay high gas fees, which go to the validator, to get their transactions included. ethereum.org notes that for competitive opportunities like DEX arbitrage, searchers may hand 90% or more of their MEV revenue to the validator in fees.

The main strategies

ethereum.org describes several kinds of MEV:

Strategy What happens
DEX arbitrage A token trades at different prices on two exchanges; a searcher buys on one and sells on the other in a single transaction
Liquidations When a borrower on a lending protocol can be liquidated, searchers race to submit the liquidation and collect the fee
Sandwich trading A searcher places a trade just before and just after a large pending trade, profiting from the price move it causes
NFT MEV Searchers front-run popular NFT drops or snap up NFTs listed at mistakenly low prices

Not all of these are bad for users. ethereum.org explains that many DeFi projects rely on them: DEX arbitrage helps users get the most correct prices for their tokens, and lending protocols rely on speedy liquidations so lenders get paid back. See what is DeFi? and DeFi lending, staking and tax.

How sandwich trades cost you

A sandwich works like this:

  1. You submit a large swap on a decentralized exchange, with some slippage tolerance: the worst price you’ll accept.
  2. A searcher sees your pending trade and buys first, pushing the price up.
  3. Your trade executes at the higher price, still within your tolerance.
  4. The searcher sells right after, at the inflated price, and keeps the difference.

ethereum.org says users face increased slippage and worse execution on their trades as a result. The wider your slippage tolerance and the larger your trade relative to the market, the more room there is.

A simple illustration

Suppose you swap a stablecoin for a small token on a decentralized exchange, with a slippage tolerance of 3%. Your trade alone would move the price by about 1%. A searcher sees it, buys first and pushes the price up by roughly 2%, so your trade still fits inside your 3% limit, but now fills about 3% worse than it would have. The searcher then sells into the higher price. You never see the searcher, only a worse result than you expected.

The numbers are only an illustration: the real amounts depend on the size of the trade and the depth of the market. The lesson is that a generous slippage tolerance is an invitation.

Effects on the whole network

ethereum.org also points to wider effects:

  • Congestion and higher gas prices, as searchers compete with each other by bidding up fees. See Ethereum gas fees explained.
  • Consensus risk: if the MEV available in a block were much larger than the block reward, validators could be tempted to reorganize recent blocks to capture it, which would threaten the chain’s stability.
  • Centralization pressure: ethereum.org says MEV extraction is believed to be capable of accelerating validator centralization, because larger staking pools have more resources to invest in capturing it.

What Ethereum has changed

Two related ideas aim to limit the damage:

  • Proposer-builder separation (PBS) splits the job of building a block (choosing and ordering transactions) from proposing it to the network. Specialized builders compete to build the most valuable block, and validators simply choose between them. ethereum.org describes it as an auction market where builders bid for blockspace, which lowers the barrier for solo stakers to benefit from MEV.
  • MEV-Boost is an implementation that lets validators source blocks from external builders through a Builder API, with builders competing through bids.

These change who captures MEV more than whether it exists. For traders, the practical risks of sandwiching remain.

Protecting your own trades

ethereum.org’s documentation is about how MEV works rather than consumer advice, but a few habits follow from it:

  • Keep slippage tolerance tight. A trade that fails is usually better than one filled at a much worse price.
  • Split very large trades, or use deeper markets, so a single swap doesn’t move the price much.
  • Check your wallet’s options. Some wallets and services offer ways to send trades that aren’t exposed in the public queue; read how they work before relying on them.
  • Be wary of thin markets, such as newly launched tokens. See memecoins and their risks.

MEV is part of how public blockchains work. Knowing it exists is the first step to not paying more for your trades than you need to.

Frequently asked questions

What does MEV stand for?
Maximal extractable value. It was first called miner extractable value, when Ethereum used proof of work; after the switch to proof of stake, validators order transactions, so the more general name stuck.
What is a sandwich attack?
A searcher spots a large trade waiting to be included, places a buy just before it and a sell just after it. Your trade then executes at a worse price, and the searcher keeps the difference. ethereum.org says users face increased slippage and worse execution.
Is MEV always bad?
No. ethereum.org explains that many DeFi projects rely on it: DEX arbitrage keeps token prices correct, and lending protocols depend on fast liquidations to repay lenders. Sandwich trading is different, because it directly costs the trader being sandwiched.
How can I reduce the risk of being sandwiched?
Keep your slippage tolerance tight, so a trade fails rather than executing at a much worse price, and be careful with large trades in small, illiquid markets. Some wallets and services offer protection from sandwiching; check how they work before relying on them.
Does MEV happen on Bitcoin?
This guide follows ethereum.org's explanation, which is about Ethereum. Any blockchain where block producers choose and order transactions can have some form of it, but the strategies described here are mostly about Ethereum's decentralized finance.

Sources

  1. Maximal extractable value (MEV) — ethereum.org
  2. Gas and fees — ethereum.org
  3. Transactions — ethereum.org

First published . Spotted an error or an outdated figure? Tell us and we will check it against the source.