Overview

A sandwich attack is a sophisticated form of front-running. The attacker 'sandwiches' a victim's trade between two of their own transactions to profit from the price movement caused by the victim.

The Process

  1. Front-run: Attacker buys the token the victim is about to buy, pushing the price up slightly.
  2. Victim Trade: The victim buys the token at the now-higher price, pushing it up even further.
  3. Back-run: The attacker immediately sells the tokens they bought in step 1 at the new, higher price.

Result

The victim gets a worse price (more slippage), and the attacker walks away with a risk-free profit.

Related Terms