A sandwich attack is a type of price manipulation attack that can occur in decentralized exchanges (DEXs) in DeFi. In a sandwich attack, the attacker places two transactions around a target transaction. The first transaction involves buying a large amount of a particular token, which drives up the price of the token. The target transaction, which is placed between the two sandwiching transactions, is then executed at the inflated price. Finally, the attacker executes the second transaction, w...