Sandwich Attack Cost

Cost

Sandwich attack cost refers to the financial loss incurred by a legitimate user’s transaction due to front-running by a malicious actor. This attack involves placing two transactions around a target transaction—one before and one after—to profit from the resulting price movement. The cost to the victim is typically measured as the difference between the expected execution price and the actual price received, which is essentially a form of slippage. In decentralized exchanges, this cost is a direct consequence of the transparency of the mempool and the ability of miners or validators to reorder transactions.