What Is the Typical Profit Mechanism for the Attacker in a Sandwich Attack?
The attacker profits by buying the asset at a lower price just before the victim's large buy order pushes the price up (the front-run) and then selling the asset at the higher, post-victim-trade price (the back-run). The profit is the difference between the price of the initial buy and the final sell, minus the gas fees paid for both transactions.
This profit is directly extracted from the victim who executed their trade at a worse price.