Skip to content

Latest commit

 

History

History
8 lines (5 loc) · 568 Bytes

sandwich-attack.md

File metadata and controls

8 lines (5 loc) · 568 Bytes
description
What is a sandwich attack?

Sandwich attack

Alice wants to buy a Token A on a Decentralised Exchange (DEX) that uses an automated market maker (AMM) model. An adversary which sees Alice’s transaction can create two of its own transactions which it inserts before and after Alice’s transaction (sandwiching it). The adversary’s first transaction buys Token A, which pushes up the price for Alice’s transaction, and then the third transaction is the adversary’s transaction to sell Token A (now at a higher price) at a profit.