Skip to main content

How Do “Sandwich Attacks” Exploit the Price Changes Caused by Large Trades in an AMM?

A sandwich attack involves a malicious actor detecting a large pending trade in the mempool. The attacker executes a small buy order just before the large trade (the "front-run"), driving up the price.

The large trade then executes at the higher, front-run price, incurring more slippage. Immediately after, the attacker executes a sell order (the "back-run") at the newly inflated price.

The attacker profits from the price movement caused by the victim's trade, and the victim pays a higher execution price.

Provide a Simple Example of a Miner Extractable Value (MEV) Opportunity
What Is ‘Sandwiching’ in the Context of Decentralized Exchange (DEX) Front-Running?
What Is the Key Vulnerability That Sandwich Attacks Exploit on Automated Market Makers (AMMs)?
Explain the Concept of a “Sandwich Attack” as a Specific Form of MEV Front-Running