Esoteric · community
The economics of getting sandwiched (and how to stop)
A from-scratch walk through a sandwich bundle, the searcher's P&L, and exactly which slippage setting makes you a target.
Anatomy
A searcher front-runs your swap to push the price to your slippage limit, lets your trade fill at the worst tolerated price, then back-runs to unwind. Their profit is, to first order, your slippage tolerance minus gas and fees.
Defenses
Lower your slippage tolerance to the minimum that still fills. Route through a private relay so your transaction never hits the public mempool. For large orders, split across blocks or use an intent-based venue where solvers compete on net price.
Community contribution — not reviewed for financial accuracy. Nothing here is financial advice.