Skip to content
Vol. 1 · Ed. 2026
CyberGlossary
Entry № 965

Sandwich Attack

What is Sandwich Attack?

Sandwich AttackA form of MEV in which an attacker places a buy order before a victim's pending swap and a sell order immediately after, profiting from the artificial price move they induce.


Sandwich attacks target swaps on automated market makers (AMMs) such as Uniswap, SushiSwap, or PancakeSwap. The attacker spots a large pending swap in the public mempool that will move the pool's price. They submit a front-running buy of the same asset with higher gas, the victim's swap then executes at a worse price because of the moved curve, and the attacker immediately back-runs with a sell at the new inflated price. The victim suffers extra slippage; the attacker pockets the difference minus gas. Defences include tight slippage tolerances, private order flow (Flashbots Protect, MEV-Share), batch auctions like CoW Swap, and routing aggregators that split orders.

Examples

  1. 01

    A whale executes a 5 million USDC to ETH swap on Uniswap V3 and a bot front-runs and back-runs it, extracting tens of thousands of dollars.

  2. 02

    On BNB Chain, sandwich bots commonly target large PancakeSwap trades on low-liquidity pools.

Frequently asked questions

What is Sandwich Attack?

A form of MEV in which an attacker places a buy order before a victim's pending swap and a sell order immediately after, profiting from the artificial price move they induce. It belongs to the Web3 & Blockchain category of cybersecurity.

What does Sandwich Attack mean?

A form of MEV in which an attacker places a buy order before a victim's pending swap and a sell order immediately after, profiting from the artificial price move they induce.

How does Sandwich Attack work?

Sandwich attacks target swaps on automated market makers (AMMs) such as Uniswap, SushiSwap, or PancakeSwap. The attacker spots a large pending swap in the public mempool that will move the pool's price. They submit a front-running buy of the same asset with higher gas, the victim's swap then executes at a worse price because of the moved curve, and the attacker immediately back-runs with a sell at the new inflated price. The victim suffers extra slippage; the attacker pockets the difference minus gas. Defences include tight slippage tolerances, private order flow (Flashbots Protect, MEV-Share), batch auctions like CoW Swap, and routing aggregators that split orders.

How do you defend against Sandwich Attack?

Defences for Sandwich Attack typically combine technical controls and operational practices, as detailed in the full definition above.

What are other names for Sandwich Attack?

Common alternative names include: AMM sandwich, Sandwich MEV.

Related terms