Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Subscribe

Crypto Swap Slippage Explained: Price Impact, Tolerance and Sandwich Bots

crypto swap slippage explained crypto swap slippage explained

Crypto swap slippage explained simply: it is the gap between the price you see before clicking confirm and the price your trade actually fills at. On a deep, quiet market it is negligible. On a thin token during a volatile session, it can quietly consume several percent of a position while appearing on no receipt. Three related but distinct costs get bundled under the word, and separating them is the only way to do anything useful about them.

Crypto Swap Slippage Explained: The Two Engines Behind It

Slippage has two root causes. The first is liquidity: the amount of an asset available to trade near the current price. A simple analogy holds. You need eleven apples at $1 each, expecting to pay $11. The first shop has only eight, so you spend $8 there, then find a second shop charging $1.50 each and pay $4.50 for the remaining three. Total cost: $12.50 instead of $11. That $1.50 shortfall is liquidity slippage. The supply at your target price ran out; the rest filled at worse prices.

The second engine is volatility. Even in a perfectly deep market, the price can move between the moment you submit an order and the moment it settles. News events, social-media surges, and thin overnight sessions all accelerate this. On-chain settlement takes time, and every second your transaction spends pending is a second the market can drift.

The two compound. Small-cap tokens are typically both thin and volatile, so a single trade can suffer both flavours simultaneously. Larger order size worsens both components: it eats deeper into the book and takes longer to fill, extending the exposure window. Identifying which engine is dominant tells you which fix to reach for, because the remedies differ.

Slippage, Price Impact and Spread Are Three Different Costs

Price impact is the price movement your order itself causes. On a decentralised exchange running a constant-product automated market maker (AMM), SIFMA’s comment letter to the SEC Crypto Task Force noted that a trade’s price impact is determined by the protocol’s maths, and that prices are set by local liquidity pool conditions rather than any traditional order-book mechanism. That means price impact on an AMM is calculable before you trade: a function of your order size against pool depth, not a guess.

Slippage is the additional drift caused by everything outside your own order between quote and execution: other trades landing first, the price moving independently. Price impact is what you cause; slippage is what happens to you while you wait.

Spread is a third, separate cost: the gap between the highest bid and the lowest ask on an order-book venue. On a centralised exchange, crossing that spread costs you before any slippage or impact enters. A clean mental model: spread is the toll to enter, price impact is the cost of your own weight, and slippage is the drift while you cross. A large trade on a thin, volatile token pays all three.

How AMMs Handle Slippage Differently from Order Books

On a centralised exchange, a market order walks the book, filling at progressively worse prices as it consumes each resting order. The limit order is the clean fix: it executes only at your specified price or better, eliminating negative slippage on entry at the cost of possible non-execution.

AMMs replace the order book with a liquidity pool and a formula. Uniswap’s developer documentation describes pools made up of reserves of two ERC-20 tokens, permissionless and immutable, with prices updating based on pool state as trades shift the ratio. The constant-product model requires that the product of the two token quantities remain constant; larger trades travel further up the price curve, producing steeper price impact.

Pool design matters significantly. A GitHub-hosted deep dive into the Uniswap v3 whitepaper explains that Uniswap v3 introduced concentrated liquidity, allowing liquidity providers to deploy capital within specific price ranges rather than across the full curve. This concentrates depth where trading is active, reducing price impact for trades within that range compared to earlier designs where capital was spread uniformly.

On an AMM, slippage proper enters because your transaction queues before settling on-chain, and the pool price can shift as other trades land first. DEXs handle this by asking you to set a slippage tolerance.

The Slippage-Tolerance Trap and Sandwich Bots

Slippage tolerance is the maximum adverse price movement you authorise before a swap reverts. Set it too low in a volatile pool and your transactions fail repeatedly, costing gas each time. Set it too high and you create a harvesting opportunity.

Sandwich bots monitor the public transaction queue, identify your pending swap, buy the asset just before your trade to push the price toward your tolerance ceiling, let your transaction execute at that inflated price, then sell immediately into the liquidity your trade created. Your tolerance setting defined exactly how much they could extract.

An SSRN-hosted academic paper on blockchain transaction ordering found that some sandwich attacks involve front-run and back-run transactions separated by more than 200 intervening transactions, meaning these bots can operate across extended sequences, not just immediately adjacent slots. The threat is not limited to the obvious case.

The correct tolerance is the smallest value that still allows reliable execution. Deep stablecoin pairs rarely need more than 0.25% to 0.5%. Well-traded assets with moderate volatility sit comfortably at 0.5% to 1%. Only genuinely volatile tokens or fresh launches justify higher settings, and choosing a high tolerance there is a conscious trade-off, not a free pass. Private transaction routing, where the order bypasses the public queue entirely, attacks the problem at its root rather than managing around it.

A Worked Example: Stacking the Three Costs

You swap $10,000 of a stablecoin into a small token. The interface shows a 2% price impact before you click: your order is large relative to the pool, and the constant-product curve moves that far against you. That 2% is already priced into the quoted output. It is not slippage; it is the known cost of your order’s size.

You set a 1% slippage tolerance and submit. While your transaction waits, other buys land against the same pool. The price rises. Your trade executes at the new, worse starting point. The gap between your quoted output and your received output, caused entirely by what happened while you waited, is the slippage: capped at 1% by your setting or the transaction reverts.

The three costs stacked: an implicit spread in the pool’s pricing, 2% price impact from order size, and up to 1% slippage from market movement during the pending window. A trader blaming slippage for the full gap would misdiagnose the trade. Most of the cost here was price impact, and no tolerance adjustment fixes that: only a smaller order or a deeper pool does.

Keeping Slippage Small: The Practical Checklist

SIFMA‘s framework for AMM regulation distinguishes between the protocol itself, its governing organisations, front-end interfaces, and liquidity providers as separate layers. For traders, the interface layer is where most of the practical controls live.

Trade liquid pairs where depth is deep. Route through large pools even if an extra hop is required; a nominal fee difference rarely outweighs the price-impact saving. Size orders relative to available liquidity: a trade that is small relative to a pool barely moves it. Breaking a large order into smaller tranches over time reduces each transaction’s footprint, at the cost of additional gas.

Use limit orders on centralised venues for any trade where urgency is low. Set slippage tolerance deliberately to match the asset’s actual volatility. Prefer interfaces offering private routing or intent-based execution that shield your order from the public queue. Trade during high-liquidity hours and pay enough gas for prompt confirmation: the longer a transaction sits pending, the longer the price has to drift.

Slippage is execution-price uncertainty. You reduce it either by removing the uncertainty (limit orders, private routing) or by shrinking your exposure to it (deeper liquidity, smaller size, faster confirmation). The gap between ignoring it and managing it is, across a year of active trading, a real and compounding line on the ledger.

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use