Sandwich attack
A sandwich attack places one trade before and another after a user's DEX trade to profit from the price movement caused by that user's transaction.
✦ Key Insight
Sandwiching can directly worsen execution for DEX users. Larger trades, thin liquidity, and wide slippage settings can make a transaction more attractive to sandwich searchers.
✕ Common Misconceptions
Setting extremely tight slippage can reduce sandwich room but may also make legitimate transactions fail. Use reputable routing, reasonable slippage settings, and protective transaction-routing features where available.
Detailed Explanation
In Practice
Dig Deeper
Slippage
Slippage is the difference between an expected trade price and the actual execution price.
Mempool
A mempool is a node's temporary pool of valid, unconfirmed transactions waiting to be included in a block.
Front-running
Front-running occurs when someone observes a pending action and gets a strategically related transaction executed before it to capture an advantage.
MEV
MEV is value that can be extracted by strategically including, excluding, or ordering transactions around normal blockchain activity.
