What Is the Role of Gas Fees in Executing a Successful Sandwich Attack?
Gas fees are crucial. The attacker must ensure their front-run transaction is included immediately before the victim's and their back-run transaction immediately after.
To guarantee this precise ordering, the attacker must pay a higher gas fee (a "gas war") than the victim for the front-run and a competitive fee for the back-run. The attack is only profitable if the profit from the sandwich exceeds the total gas cost of the two manipulative transactions.