MEV, maximal extractable value, is the profit that can be extracted by reordering, inserting or censoring transactions within a block. You submit a trade, someone with better tooling sees it before it lands, and by the time your transaction executes, the price has been moved against you by design. Nothing was hacked. No contract was exploited. The rules of the chain were followed perfectly, and you still paid a tax you never agreed to. This guide explains how that works, why sandwich attacks are its most notorious form, and what protection actually looks like in 2026.

Why MEV exists at all
Public blockchains have two properties that combine badly for traders. First, pending transactions are visible: before your swap is confirmed, it sits in the mempool where anyone can read its full contents, including what you’re buying, how much, and the worst price you’ll accept. Second, transaction order within a block is not first-come-first-served; whoever builds the block decides the sequence, and sequence determines prices on automated market makers.
Put those together and transaction ordering itself becomes a monetizable resource. An entire professional supply chain has grown around harvesting it: searchers run bots that scan the mempool for profitable opportunities and bundle transactions to capture them, builders assemble those bundles into full blocks, and validators auction off the right to have their block proposed, typically accepting the highest-bidding builder. It’s industrialized, competitive, and measured in serious money: sandwich attacks alone have generated on the order of a million dollars a week for searchers during active periods.
Not all MEV is an attack
MEV covers a spectrum, and lumping it together obscures who’s actually being hurt.
- Arbitrage. Bots equalize prices between exchanges, buying where an asset is cheap and selling where it’s expensive within one block. Extractive toward liquidity providers, but it keeps prices coherent across venues.
- Liquidations. Lending protocols need undercollateralized positions closed fast, and MEV bots race to do it for the liquidation bonus. Ruthless, and load-bearing for DeFi solvency.
- Front-running. A bot sees your pending transaction and inserts its own copy ahead of you with higher priority, taking the opportunity you found. Purely predatory.
- Sandwich attacks. The signature predatory form, and the one that targets ordinary traders directly. It deserves its own section.
Anatomy of a sandwich attack
Say you submit a swap on an AMM: buy $10,000 of a token, with slippage tolerance set to 3 percent, meaning you’ll accept up to 3 percent price movement before your transaction reverts. A searcher’s bot reads that pending transaction in the mempool and executes three moves.
- Front-run. The bot buys the same token immediately ahead of your transaction in the block. On an AMM, its buy pushes the price up.
- Your trade executes. You now buy at the inflated price. Because the total movement stayed inside your 3 percent tolerance, your transaction goes through instead of reverting. Your own slippage setting defined exactly how much could be taken from you.
- Back-run. The bot sells its tokens immediately after your trade, into the price your purchase pushed even higher. It exits with a profit; you exit with fewer tokens than the quote promised.
The victim’s loss per trade is usually small enough not to notice, a fraction of a percent to a few percent, which is precisely why it scales: millions of small invisible cuts, automated, all day. Bigger trades in thinner pools with looser slippage settings bleed the most, and bots calculate the optimal extraction against your exact parameters before committing a single transaction.

What actually protects you as a trader
Four habits remove most of the attack surface, in descending order of impact.
Tighten slippage. Your slippage tolerance is the attacker’s profit ceiling. Set it as low as the pair’s normal volatility allows, often well under 1 percent for liquid pairs, and treat any interface defaulting you to 3 percent or more as an invitation you should decline. If a trade only goes through at high slippage, the trade is telling you something.
Route privately. Bots can’t sandwich what they can’t see. Private RPC endpoints and protected transaction services submit your transaction directly to block builders without touching the public mempool, cutting off the information the entire attack depends on.
Split large trades and prefer deep pools. Price impact grows with trade size relative to liquidity, so several smaller swaps in a deep pool present a far leaner target than one whale-sized order in a shallow one.
Use venues with built-in protection. Batch auctions, MEV-protected aggregators and chains with protection at the infrastructure layer shift the burden off the user entirely, which is where this is all heading.
Protocol-level defense: where the problem actually gets solved
User-side hygiene mitigates; it doesn’t cure. As long as transactions are public before execution and ordering is auctioned to the highest bidder, individual caution is a tax on the informed and a trap for everyone else. The durable fixes live in infrastructure: encrypted or private mempools that hide transaction contents until inclusion, batch auctions that execute everyone in a batch at one uniform price so ordering inside the batch stops mattering, and sequencer-level protections on L2s, where the chain itself takes responsibility for fair ordering instead of outsourcing it to an adversarial auction.
That third path is the one we build on. Luntra’s MEV Radar uses graph neural networks to predict sandwich patterns before execution, automatically routes vulnerable transactions through a private relayer, and refunds gas to affected users, protection as a property of the chain rather than a skill users must acquire. If you’re building a DEX, an aggregator or anything whose users submit swaps, fair execution is a feature your competitors’ users are already asking for; the MEV Radar SDK exists so you can ship it without building the detection stack yourself.

MEV on L2s: the sequencer question
Layer 2 rollups change the geometry of the problem without abolishing it. Most L2s today run a single sequencer that orders transactions, which removes the open ordering auction of L1 but concentrates the ordering power in one operator. That’s simultaneously the risk and the opportunity: a sequencer could extract value itself, or it can be engineered as the enforcement point for fairness, applying first-come ordering, hiding transaction contents until inclusion, and screening predatory patterns before they ever touch a block.
The opportunity is why L2s are where MEV protection is advancing fastest. When the chain controls ordering, protection stops being a per-wallet setting and becomes policy: every user of every app on the chain inherits it by default, including the ones who’ve never heard the word slippage. On general-purpose L1s that guarantee is structurally unavailable, which is a real and underrated argument in any “which chain do we deploy on” conversation for consumer-facing DeFi.
One more frontier deserves a mention for completeness: MEV pressure can even reach consensus itself, with so-called time-bandit scenarios where reorganizing recent blocks to capture missed extraction becomes theoretically profitable. It’s the extreme end of the spectrum, and it’s why researchers treat MEV as a network security topic rather than merely a trading nuisance.
FAQ
What does MEV stand for?
Maximal extractable value: the maximum profit extractable from a block by controlling the inclusion, exclusion and ordering of its transactions. It was originally “miner extractable value” before proof-of-stake made the older name obsolete.
Is a sandwich attack illegal?
It occupies a gray zone: analogous behavior in traditional markets is front-running and is prohibited, but on public blockchains it’s executed within protocol rules by pseudonymous actors across jurisdictions. Practically, protection comes from infrastructure and habits, not enforcement.
How do I know if I’ve been sandwiched?
The tell is consistent execution slightly worse than quoted, especially on larger trades in thinner pools. Block explorers and MEV inspection tools can show your transaction flanked by the same address buying immediately before and selling immediately after you.
Does low slippage fully protect me?
It caps the damage per trade and makes you an unattractive target, but the complete fix is invisibility: private routing or a chain with sequencer-level protection, so the mempool surveillance the attack depends on never sees you.
Does MEV exist outside Ethereum?
Yes. Any chain with visible pending transactions and profitable ordering has MEV, including fast chains; speed changes the tooling, not the incentive. L2s are the arena where infrastructure-level fixes are being deployed most aggressively.