Skip to main content

What Mechanism in Automated Market Makers (AMMs) Is Exploited by Sandwich Attacks?

Sandwich attacks exploit the deterministic pricing formula and the public nature of the transaction queue (mempool) in AMMs like Uniswap. The constant product formula ($x y=k$) means a large trade causes a predictable price shift.

The attacker sees the trade in the mempool and executes transactions to profit from this predictable, price-shifting impact before and after the target trade.

How Does the Concept of a ‘Mempool’ Relate to the Risk of ‘Front-Running’ in DeFi?
What Is the Difference between a Private Mempool and an Encrypted Mempool?
What Mechanism on a DEX Makes It Vulnerable to Price Manipulation via Sandwich Attacks?
How Do Automated Market Makers (AMMs) Create the Vulnerability for Sandwich Attacks?