Independent research · No paid placements · Not financial advice

Crypto Infrastructure RESEARCH · NOT SOLD
Guides

What Is MEV? Sandwich Attacks, Searchers and Why It Matters

What is MEV? Maximal extractable value is the profit from ordering transactions in a block. How searchers, builders and MEV-Boost work, a worked sandwich attack example, builder market data plus MEV protection options.

What Is MEV? Sandwich Attacks, Searchers and Why It Matters – featured image, cryptoinfrastructure.io
TL;DR summary

MEV (maximal extractable value) is the extra profit someone can make by choosing which transactions go into a block and in what order, beyond the normal block reward and gas fees. Specialized bots called searchers find these opportunities (arbitrage, liquidations, sandwich attacks). Builders pack them into blocks. Validators sell their block space to the highest-paying builder through MEV-Boost. Some MEV keeps DeFi prices accurate; some, like sandwich attacks, comes straight out of ordinary users’ trades. Private transaction routes and intent-based trading reduce your exposure, but none removes it entirely.

If you have ever swapped tokens on a decentralized exchange and received less than the quote, or seen a wallet address tagged “MEV bot” in a block explorer, you have met MEV. Most explainers stop at the definition. This guide explains what MEV is, who earns it, how a sandwich attack works with real arithmetic, what the block-building market looks like, what “MEV protection” in your wallet actually does plus where the law stands after the $25 million Peraire-Bueno case.

What is MEV in blockchain?

MEV stands for maximal extractable value. The ethereum.org MEV documentation (page updated 26 February 2026) defines it 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 term started as “miner extractable value” under proof of work, when miners decided block contents. After Ethereum moved to proof of stake, validators took over that role and the name changed to “maximal”, since the value is no longer tied to mining. MEV is not unique to Ethereum. It exists wherever someone controls transaction ordering: other EVM chains, Solana plus layer-2 rollups, covered below.

When people say “MEV in trading”, they usually mean the trading strategies that capture this value: arbitrage between exchanges, liquidating risky loans plus front-running or sandwiching other users’ swaps.

How MEV works: the mempool, searchers, builders and validators

MEV exists because transactions are visible before they are final. When you send a transaction on Ethereum, it normally waits in the public mempool (short for memory pool), a shared waiting area that any node can read. Anyone watching the mempool can see what you are about to do and react before your transaction lands in a block.

Four roles turn that visibility into profit:

RoleWhat it does
SearcherRuns bots that scan the mempool and on-chain state for profitable orderings, then sends “bundles” of transactions with a payment attached.
BuilderCombines searcher bundles and regular transactions into the most valuable full block it can, then bids for the right to have it proposed.
RelayCollects blocks from many builders, checks them, then passes the most profitable bid to the validator without revealing the block contents first.
Validator (proposer)Picks the highest bid and signs the block. It earns the builder’s payment on top of normal rewards.

The money flows backwards through that chain. A searcher finds a $1,000 opportunity and offers most of it to the builder to win inclusion; the builder pays most of its block’s value to the validator to win the slot. Ethereum.org notes that rational searchers may bid up to 100% of their MEV in fees. It adds that in highly competitive DEX arbitrage they may pay 90% or more of their MEV revenue. So competition pushes much of the value to validators.

MEV-Boost and proposer-builder separation

Validators rarely build these blocks themselves (a16z crypto’s MEV explainer says proposers “rarely” do on Ethereum). They reach the block-building market through MEV-Boost, which the Flashbots documentation (last updated 17 November 2025) describes as “open source middleware run by validators to access a competitive block-building market.” It runs next to the validator’s consensus client, asks connected relays for builder bids, then hands the winning block to the network. Flashbots cites an estimate that running MEV-Boost could increase staking rewards by “over 60%”.

This split between whoever builds a block and whoever proposes it is called proposer-builder separation (PBS). Today it lives outside the protocol and relies on trusted relays. The plan to move it into Ethereum itself is covered further down.

Common types of MEV

  • DEX arbitrage: buying a token where it is cheap and selling where it is expensive in one atomic transaction. Ethereum.org’s example turns 1,000 ETH into 1,045 ETH across two exchanges. This is the most competitive form of MEV. It keeps prices aligned across venues.
  • Liquidations: lending protocols let anyone repay an undercollateralized loan and collect a fee. Searchers race to be first, which helps lenders get repaid quickly.
  • Front-running: placing a transaction just before a target transaction to profit from its effect, for example buying a token right before someone else’s large buy.
  • Back-running: placing a transaction just after a target, usually arbitrage that moves a pool’s price back in line after a big trade.
  • Sandwich attacks: a front-run and a back-run around the same victim trade. This is the type most harmful to ordinary users.
  • NFT and long-tail MEV: sniping mispriced listings or front-running NFT mints, plus many smaller niche strategies.

What is front-running in crypto?

Front-running in crypto means seeing a pending transaction and getting your own transaction executed first, usually by paying a higher fee or a builder tip. Ethereum.org describes “generalized frontrunners”: bots that copy any profitable pending transaction, swap in their own address, simulate it, then resubmit it with a higher fee. On a public blockchain the pending transaction is visible to everyone. The legal position of strangers acting on it is unsettled (see the legal section below).

What is a sandwich attack? A worked example

A sandwich attack has three transactions in a row inside one block:

  1. Front-run: the attacker buys the same token you are buying, pushing the price up.
  2. Your trade: you buy at the now-higher price, pushing it up further.
  3. Back-run: the attacker sells the tokens bought in step 1 at the higher price.
Three steps of an MEV sandwich attack: attacker front-runs, the victim's swap fills at its minimum, attacker back-runs
The attacker sizes the front-run so your trade still meets your slippage minimum, taking almost all of it.

The limit on how much an attacker can take is your slippage tolerance: the percentage below the quoted amount that you agreed to accept. The attacker sizes the front-run so your trade still lands just above that minimum. The numbers below show why this setting matters so much.

The setup (hypothetical)

Assumptions, chosen to keep the arithmetic clear: a constant-product pool (the simple x × y = k pricing rule used by many automated market makers) holding 1,000 ETH and 2,000,000 USDC, so the starting price is 2,000 USDC per ETH. You swap 100,000 USDC for ETH. Pool fees, gas and builder payments are left out.

With no attack, you receive about 47.62 ETH (an average of about 2,100 USDC per ETH, because a trade this size moves the pool’s price).

Slippage set to 1%Slippage set to 3%
Minimum you accepted47.14 ETH46.19 ETH
Attacker’s front-run buy10,321 USDC for 5.13 ETH31,441 USDC for 15.48 ETH
What you actually receive47.14 ETH46.19 ETH
Your average priceabout 2,121 USDC per ETHabout 2,165 USDC per ETH
You lose versus no attack0.48 ETH (about $952 at $2,000)1.43 ETH (about $2,857 at $2,000)
Attacker’s back-run sale5.13 ETH for 11,371 USDC15.48 ETH for 34,586 USDC
Attacker’s gross profitabout 1,049 USDCabout 3,145 USDC

Calculated using a constant-product formula with no fees. Hypothetical pool and trade; real outcomes also depend on pool fees, gas, builder bids and competing searchers.

Three things stand out. First, you still get “at least the minimum”, so the trade looks normal in your wallet, but you have quietly lost almost all of your slippage allowance. Second, tripling the slippage setting roughly tripled both your loss and the attacker’s profit. Third, the attacker’s gross profit is not all kept: in a competitive market much of it is paid to the builder and validator to get the bundle included in that exact order.

Setting slippage very tight is not a free fix. If the price moves for honest reasons, your transaction reverts. A failed transaction sent through the public mempool can still cost gas. Ethereum.org also notes that sandwiching is riskier for the attacker than arbitrage because it is not atomic. It adds that bots have been tricked by “salmonella” tokens built to punish them.

Why MEV matters: the good and the bad

MEV is not all theft. Ethereum.org lists real benefits: arbitrage keeps decentralized exchange prices in line with the rest of the market, and fast liquidations protect lenders from bad debt.

The costs are just as real:

  • Worse execution for users: sandwich attacks raise the price you pay, as shown above.
  • Network congestion: ethereum.org records that MEV extraction “ballooned” in early 2021 and pushed gas prices very high, before off-chain auctions moved much of that bidding out of the public mempool.
  • Consensus risk: if a block holds far more MEV than the normal reward, a validator could be tempted to reorganize the chain to capture it.
  • Centralization: large operators reinvest MEV profits into better extraction. Block building has become concentrated (next section).

Who builds Ethereum’s blocks? Market data

The public dashboard relayscan.io showed the following for the 24 hours to 05:05 UTC on 14 October 2026:

Top buildersBlocksShare
Titan3,44853.42%
Quasar1,46522.70%
BuilderNet1,00215.52%
Eureka2443.78%
bombora.build1462.26%
Bar chart of Ethereum MEV block builder share: Titan 53.42%, Quasar 22.70%, BuilderNet 15.52%, Eureka and bombora.build
In this one-day snapshot, two builders produced about three in four MEV-Boost blocks.
Top relaysPayloads deliveredShare
Ultra Sound relay5,73133.41%
Titan relay5,44931.77%
Aestus2,82316.46%
bloXroute (regulated)2,64215.40%
Flashbots2771.62%

Source: relayscan.io overview, 24-hour window. Shares move day to day; a single day is a snapshot, not a trend.

The headline: in that window two builders produced about three in four MEV-Boost blocks. One produced more than half. Ethereum’s validator set is large and spread out, but the people choosing transaction order inside most blocks are a handful of specialized firms. That concentration, plus the trust validators place in a few relays, is the backdrop to the plan to build PBS into the protocol itself.

Enshrined PBS: EIP-7732 and Glamsterdam

MEV-Boost depends on trusted relays: a validator signs a block header without seeing the contents and trusts the relay to release them. EIP-7732, “Enshrined Proposer-Builder Separation”, moves this into the protocol. It separates execution validation from consensus validation and adds builders as an in-protocol role. It also gives validators a new duty to attest that the builder’s payload arrived on time.

EIP-7732 entered “Last Call” with a review deadline of 1 November 2026. The EIPs Insight Glamsterdam tracker still listed it as Last Call after that deadline, among the EIPs client teams have agreed to ship in Glamsterdam. Glamsterdam activated on the Sepolia testnet on 6 October 2026. No mainnet activation date has been announced. Enshrined PBS changes who has to be trusted in block building; it does not by itself stop searchers from sandwiching users.

Should you turn on MEV protection?

“MEV protection” in a wallet or DEX usually means one thing: your transaction skips the public mempool. If bots cannot see your swap before it is included, they cannot sandwich it. For swaps on Ethereum, that closes off the most common attack route, but each option works differently and none is perfect:

OptionHow it protects youTrade-offs and caveats
Flashbots Protect (RPC)Sends your transaction to a private Flashbots mempool “hidden from frontrunning and sandwich bots”. Transactions are only included if they do not revert, so failed swaps cost no gas. Offers MEV and gas-fee refunds.You trust Flashbots and the builders it shares with. Flashbots states its RPC does not track or log IP or location.
MEV Blocker (RPC)Searchers bid to back-run your transaction but may not front-run or sandwich it. You receive 90% of the back-run profit as a rebate, validators keep 10%.Its site says about 0.1% of transactions may still become public before confirmation because of reorgs. It advises keeping slippage limits. It showed “$219B+” volume protected and “5.5K+ ETH” rebated on 14 October 2026 (self-reported).
CoW Protocol (intents)You sign an intent instead of a swap. Solvers settle orders in batch auctions where all trades of the same pair clear at one uniform price, so transaction order inside the batch no longer changes the result. Matching orders peer to peer avoids AMM pools entirely.You depend on solvers finding a good settlement within your signed limits. Works for supported tokens and chains only.
Tight slippageCaps how much a sandwich can take, as the worked example shows.Too tight and normal price moves make the trade fail.

Sources: Flashbots Protect docs, mevblocker.io and CoW Protocol docs. Listed for explanation, not as endorsements; no affiliate links.

Two common pieces of advice do not hold up. Paying a higher priority fee does not stop front-running; a bot can simply outbid you, and a large tip can make your trade a more visible target. No private route is a guarantee either: you swap trust in the public mempool for trust in whoever runs the private one.

MEV on Solana and layer 2s

Solana: the main MEV infrastructure documented for Solana is Jito. Its block engine accepts “bundles”, which the Jito docs describe as “a list of up to 5 transactions that execute sequentially and atomically”, paid for with tips (minimum 1,000 lamports). Jito also offers a sandwich mitigation flag: adding an account whose key starts with jitodontfront makes the block engine reject any bundle that places that transaction anywhere but first. Jito’s own docs say this may reduce sandwich attacks but does not guarantee it.

Layer 2s: on rollups that use a single sequencer, that one operator orders transactions, so MEV depends on how that sequencer behaves: first come, first served, priority fees or auctions. See what a sequencer is and how layer-2 rollups order transactions for how sequencers decide ordering and where the MEV goes.

There is no settled answer yet. The leading US case does not charge anyone simply for running an MEV bot: prosecutors charged fraud, alleging deception. Where the line sits between aggressive bot competition and fraud is exactly what that case is testing.

The test case is United States v. Peraire-Bueno in the Southern District of New York. Brothers Anton and James Peraire-Bueno, both MIT graduates, were charged in May 2024 with wire fraud, conspiracy to commit wire fraud and conspiracy to commit money laundering. Prosecutors say they took about $25 million from three traders’ MEV bots in 12 seconds. According to reporting by DL News and The Block, the brothers ran more than a dozen Ethereum validators and used bait transactions to lure the victims’ sandwich bots into buying illiquid tokens. Prosecutors say they exploited a flaw in MEV-Boost by submitting an invalid signature that caused the relay to reveal the block’s contents, then altered the block so the bait became a sale. The defense argued this was fair play in a competitive bot market.

DateEvent
May 2024Brothers charged by the US Attorney’s Office for the Southern District of New York
July 2025Judge Jessica Clarke denied the defense’s pre-trial motion to dismiss the charges (Cointelegraph, 24 July 2025)
October to November 2025Jury trial before Judge Clarke, about four weeks
7 November 2025Mistrial declared after the jury could not reach a unanimous verdict
10 November 2025Prosecutors asked for a retrial
13 March 2026Hearing on the defense’s post-trial motion to dismiss for insufficient evidence; Judge Clarke said any retrial would not start before November 2026 and that she would rule on dismissal first
30 March 2026In a scheduling letter, the defense asked for any retrial to run between June and late September 2027; the government said it was available as soon as practicable (Inner City Press)

Sources: DL News, 13 March 2026; The Block, 11 November 2025.

No ruling on the post-trial dismissal motion and no retrial date has been reported. So the trial outcome so far is no verdict: there was neither a conviction nor an acquittal. Until a court rules, the case shows prosecutors are willing to treat tampering with MEV infrastructure as fraud, while ordinary arbitrage and liquidation bots operate openly. Whether sandwiching other users is itself unlawful has not been decided by any US court in this case.

What this means for you

If you trade on decentralized exchanges, MEV is a cost you can reduce: use a private RPC or an intent-based exchange, keep slippage as tight as the market allows and be wary of large swaps in thin pools. If you stake ETH, MEV-Boost payments can add materially to validator income (Flashbots cites an estimate of over 60%). The relays and builders your validator connects to become a real dependency. If you build DeFi apps, design choices such as batch auctions, private order flow and limit orders decide how much of your users’ value leaks to searchers.

For background, read what DeFi is and how it works, what a nonce is in blockchain (it explains why pending transactions queue the way they do) and what account abstraction is, or browse all Guides.

This guide is general information, not investment, legal or trading advice. Nothing here is a recommendation to use any platform, bot or protocol. See the site’s disclaimer.

LS

Luca Sebastian

Luca Sebastian is the founder and editor-in-chief of Crypto Infrastructure. He sets the site's research methodology and writes its plain-English explainers on crypto fundamentals, from seed phrases, Bitcoin halving and DeFi to market cap, whales and MEV, as well as the site's crypto glossary.

How we research →