Skip to main content

What Is ‘Sandwiching’ in the Context of Decentralized Exchange (DEX) Front-Running?

Sandwiching is a specific type of front-running attack on a DEX, often involving an Automated Market Maker (AMM). An attacker sees a pending transaction (Victim Tx) in the mempool.

They place a buy order (Attacker Tx 1) right before the Victim Tx, which moves the price up. The Victim Tx executes at the worse, higher price (slippage).

The attacker then immediately places a sell order (Attacker Tx 2) right after the Victim Tx, profiting from the price difference.

What Is a “Sandwich Attack” and How Is It a Form of MEV?
What Are the Different Types of MEV Attacks besides Front-Running?
What Is the Role of Slippage Tolerance in Protecting against Front-Running?
What Is a “Sandwich Attack” and How Does It Relate to MEV?