What Is a “Sandwich Attack” and How Does It Exploit the AMM Structure?

A sandwich attack is a type of MEV where a malicious actor places two transactions around a target transaction in the same block. The attacker executes a small buy order (the "bread") just before the victim's trade, driving up the price.

The victim's trade executes at a worse price (high slippage), and then the attacker executes a sell order immediately after, profiting from the temporary price increase. This exploits the predictable price change of the AMM.

What Is ‘Sandwich Attack’ and How Does It Exploit the AMM Slippage Mechanism?
What Is the Typical Profit Mechanism for the Attacker in a Sandwich Attack?
What Is a “Sandwich Attack” and How Does It Utilize Mempool Visibility?
What Is a ‘Sandwich Attack’ in the Context of MEV?
What Is a “Sandwich Attack” and How Is It a Form of MEV?
How Do “Sandwich Attacks” Exploit the Price Changes Caused by Large Trades in an AMM?
What Is a Sandwich Attack and How Does It Utilize the Mempool?
What Is a “Sandwich Attack” in the Context of AMM Arbitrage?

Glossar