Crypto / Evergreen
A sandwich trade exploits a victim's authorized price range
A sandwich strategy places an economically related transaction before a target trade and another after it, seeking to profit from the target's effect on a market.
A sandwich exploits both ordering access and the target's execution permissions, so analysis must connect the observed trades to those two conditions.
The distinction that matters
A sandwich strategy places an economically related transaction before a target trade and another after it, seeking to profit from the target's effect on a market. Transaction ordering has economic value when one action changes the conditions under which another executes. Maximal extractable value describes value obtainable through inclusion, exclusion, or ordering choices around block production. Searchers, builders, validators, routers, and users can participate in different parts of that process.
How the mechanism works
In a simple AMM example, the first trade moves the price against the target, the target executes within its permitted slippage bounds, and the final trade unwinds the attacker's position. Profit depends on fees, price impact, ordering, and the target's size. Their roles should not be collapsed into one actor. Some ordering activity performs useful arbitrage or liquidation, while other strategies worsen a user's execution or exploit information revealed before settlement. The effect depends on the mechanism and the available protections. An analysis should identify the profitable sequence, who controls each step, and which user's outcome differs from a clearly stated alternative.
A worked situation
Consider this hypothetical situation: A hypothetical user submits a large swap with a wide minimum-output allowance into a shallow pool, making a range of unfavorable execution outcomes still valid under the signed request. An ordering actor can attempt to capture part of that authorized range through the surrounding trades. The user's transaction can succeed exactly as permitted while receiving less than it would have received without the adversarial ordering.
Where interpretation can fail
A narrow slippage boundary can limit some outcomes but can also cause more failures when prices genuinely move. Private submission can change visibility without guaranteeing that every intermediary behaves neutrally. Inspect the transaction sequence, pool-state changes, and encoded minimum output before labeling a poor fill a sandwich. Separate evidence of the specific sequence from ordinary price impact caused by the user's own trade. A sandwich exploits both ordering access and the target's execution permissions, so analysis must connect the observed trades to those two conditions.
The wider technical implication
A transaction can suffer ordinary price impact without being sandwiched, so attribution requires the surrounding sequence and a plausible profit path. The attacker's positions before and after the target help establish the mechanism. A poor fill alone is insufficient evidence that a particular actor deliberately worsened it.
A global perspective
The legal treatment of trading, ordering practices, and market manipulation varies by jurisdiction and facts. A technical description does not determine legality.
Sources & further reading
Ethereum.org — Maximal extractable value ↗Uniswap documentation — Swaps ↗Sources checked Oct 27, 2026. Educational examples. Historical observations are attributed to their sources. No affiliation with cited organizations.
Make the idea stick.
Mark complete when you are ready. Reaching the end alone does not mark a lesson complete.
What assumption in this guide would change the result in a different situation? Revisit the example and explain that change in your own words.
Explore crypto →