How Does Setting a Low Slippage Tolerance Protect against a Sandwich Attack?
Setting a low slippage tolerance means the user's transaction will fail if the executed price deviates from the expected price by more than the set percentage. In a sandwich attack, the front-runner's initial buy order artificially pushes the price up.
If this price movement exceeds the victim's low slippage tolerance, the victim's transaction will revert. This causes the front-runner's trade to fail to execute the 'sell' leg of the sandwich, making the attack unprofitable.