A market order in equities is invisible until it executes. On-chain it is the opposite: transactions sit in a public queue before settlement, and anyone can read what you are about to do and act first. Value captured from that ordering advantage is what MEV means — maximal extractable value.

The sandwich

The clearest form, and the one that costs retail traders most. Your buy is visible in the queue. Someone places a buy immediately in front of it, pushing the pool price up. Your order then fills at that worse price, pushing it up further. They sell immediately behind you into the price your own trade created.

You paid more, they took the difference, and nothing about it appears on a chart. It settles as a normal trade at a slightly bad price, which is why it reads as ordinary slippage unless you go looking.

The setting that decides whether it works

Slippage tolerance. The attack is only profitable within the band you authorised: it is bounded by how much worse a price you told the transaction to accept. Set 1% and you have capped the extraction at roughly 1%. Set 20% because a trade kept reverting, and you have authorised twenty.

Which produces a genuinely awkward trade-off rather than a clean answer. Tight tolerance protects you and gets your transaction rejected more often on a volatile token, and each rejection still costs a network fee. Loose tolerance always fills and always pays. There is no setting that gives you both, and anyone offering one is selling something.

The part that is not an attack

Not all MEV is predatory, and the distinction matters if you want to reason about it honestly. Arbitrage between two pools that disagree on price is also extractable value, and it is the mechanism that keeps a pool’s quote aligned with the wider market — the same function arbitrage performs in price discovery between venues. Remove it entirely and pools would drift.

The distinction is whose trade is the source. Arbitrage profits from a disagreement between venues; a sandwich profits from you, and creates the disagreement it harvests.

What to do

Size to the pool rather than to your conviction — a smaller order in a thinner pool is less worth attacking. Keep tolerance as tight as the token’s volatility allows and accept the occasional revert as a cost of business. And treat any pool where you must widen tolerance dramatically to get filled as telling you something: that is not a settings problem, it is a depth problem wearing a settings costume.