What Is a “Sandwich Attack” in the Context of DeFi and How Does It Utilize Front-Running?
A sandwich attack is a specific type of front-running on decentralized exchanges, particularly Automated Market Makers (AMMs). The attacker places two transactions: one immediately before and one immediately after a victim's transaction.
The first transaction buys the asset, driving up the price, and the second transaction sells the asset after the victim's transaction executes at the inflated price. This extracts value from the victim's trade by manipulating the price.