Learn

MEV and sandwich attacks

MEV, or maximal extractable value, is the extra profit available to whoever controls how transactions are ordered in a block. A sandwich attack is one form: a bot trades before and after your swap to profit from the price move your trade causes.

What MEV is

Ethereum.org defines MEV as the extra value a block producer can capture beyond the standard reward and gas fees by controlling which transactions a block includes, excludes and how it orders them. It says independent searchers capture much of it, often paying most of their profit to validators to win inclusion.

How a sandwich works

Ethereum.org describes sandwich trading as a searcher watching for a large DEX trade that will move a token's price, buying just before it and selling just after to profit from the shift. It says users who get sandwiched face increased slippage and worse execution.

This is why a wide slippage setting is costly: it gives a bot room to push your fill price before your swap lands. Our slippage explainer covers the setting itself.

Reducing your exposure

Use the tightest slippage that still lets your trade fill, avoid oversized trades against shallow pools, and look for venues or wallets that offer protected transaction sending or private routing. These reduce exposure but do not remove it, and some options carry extra tips or fees. Check each venue's documentation for what its protection covers. Details differ by chain, since ordering rules and tooling are not the same everywhere.

Common mistakes

Setting slippage very high so a swap never fails is the most common one, because it leaves room for a sandwich. Another is trading a large size into a shallow pool, where the price movement your own trade causes gives bots a bigger target.

Do not assume private sending makes you immune. Protection options reduce exposure but depend on the venue and chain. Compare your fill price against the quote after trading to see how much you actually lost to price movement.

Where this shows up

Sources

Last checked . Fees and terms change often; the venue's own page wins if it disagrees with ours.

  1. Maximal extractable value (ethereum.org) — checked 2026-10-17