Back to glossary

Sandwich Attack

  • A sandwich attack is a type of front-running exploit in decentralized finance (DeFi), where an attacker manipulates the order of transactions within a blockchain block. It usually happens on decentralized exchanges (DEXs) that use automated market makers (AMMs).
  • The attacker identifies a large pending trade, places a buy order just before it, and then places a sell order right after it. By “sandwiching” the victim’s trade between their own, the attacker profits from the price movement caused by the victim’s order. This practice increases costs for the victim and is considered a harmful form of market manipulation.