A Brief Discussion on What Sandwiches and MEV Are
1. What is a 'sandwich' (sandwich attack)?
A sandwich attack is a type of arbitrage attack that exploits the transparency of blockchain transactions. When users make large transactions on decentralized exchanges, attackers (usually MEV bots) monitor public transaction pools and pay higher gas fees to front-run the target token's price, causing the user's transaction to execute at a disadvantageous price. The attacker then immediately sells for profit. The whole process resembles 'sandwiching' the user's transaction in the middle, resulting in a higher buy price or lower sell price for the user.
2. How to prevent sandwich attacks?