DeCrypto Markets

Learn: exchanges

What is slippage in crypto trading?

Slippage is the difference between the price you expected and the average price your order actually filled at. On an order book it comes from walking past the best level into worse ones; in a pool it comes from moving the pool's price. It grows with order size and shrinks with market depth.

How it works

When you send a market order, you see one price: the best ask if you buy, the best bid if you sell. Your order fills there only if the best level holds enough. Anything more fills at the next level, then the next. Your average fill price ends up worse than the price you saw, and slippage measures by how much.

This site measures slippage against the touch, the best price on the side you hit, and states it in basis points: 100 basis points make 1%. Some tools measure it against the mid price between the best bid and ask, which adds half the spread on top. Both are fair; what matters is knowing which one a number uses.

On a decentralised exchange that uses a pool instead of a book, slippage comes from price impact: your own trade moves the pool's price along its curve. There you also set a slippage tolerance, the worst result you accept before the swap is cancelled. Set too loose, it becomes room for a sandwich bot.

The exact rule the games grade by

The rule the games use: on an order book, a market buy fills the asks from the lowest up, average = total quote / total coins, and slippage = (average - best ask) / best ask for a buy, (best bid - average) / best bid for a sell, in basis points. The largest size under a limit L is the biggest order on the size grid with slippage at or under L, rounded down to the step; it is solved exactly level by level. In a pool, the minimum received is floor(quote x (10000 - tolerance in bps) / 10000), and below it the swap reverts.

Step by step

  1. Note the best price on the side you will hit and the slippage limit you accept.
  2. Walk the book level by level, adding sizes, until the running slippage would pass the limit.
  3. Inside that last level, find how much more fits before the limit is reached, and round down to the size step.
  4. Check the answer: one more step should break the limit.
  5. On a swap, set the tolerance just above the drift you expect, not as loose as possible.

Why slippage grows faster than size

Each extra coin you buy comes from a worse level than the one before, so the cost per coin rises as the order grows. Double the order and the slippage usually more than doubles, because the second half fills entirely in the worse levels. In a constant-product pool the same thing happens smoothly along a curve.

Slippage also rises when markets are fast or quiet. In a fast market, levels are being taken or cancelled as you trade; in a quiet one, there is simply less resting near the touch. Crypto trades all week, and depth is often thinner at weekends and during off-peak hours.

Worked example

Slippage grows with order sizeSlippage against the best ask for market buys of every size on the same simulated book. The 6 bps limit is crossed just above 0.990 BTC.05101520Slippage (bps)Order size (BTC)Limit 6 bpsLargest size: 0.990
Slippage of a market buy against its size, same simulated BTC/USDT book. The 6 bps limit is reached at 0.990 BTC.

The curve in the diagram comes from the same simulated BTC/USDT book as the order book example. Each point is the slippage of a market buy of that size against the best ask of 66,005.0. The first 0.3102 BTC fills at the touch with no slippage at all; after that the curve climbs as the order reaches each new level.

With a limit of 6 basis points and a size step of 0.005 BTC, the largest buy is 0.990 BTC, which fills at an average of 66,044.54 for a slippage of 5.99 basis points. One step more, 0.995 BTC, slips 6.01 basis points and fails the limit.

Now double the order to 1.980 BTC. The slippage becomes 9.08 basis points. On a 65,384.10 USDT order, every basis point is about one hundredth of a percent of the notional, so the extra slippage is real money paid on top of any fee.

Takeaway: Slippage is not a fixed fee: it depends on your size and the depth in front of you. Here the limit allows 0.990 BTC, and doubling it costs 9.08 bps instead of 5.99.

Common mistakes

  • Assuming slippage scales in a straight line. Twice the size usually costs more than twice the slippage, because the extra size comes from deeper, worse levels. Check the book for the size you actually plan to trade.
  • Mixing up the two baselines. Slippage against the touch and slippage against the mid differ by half the spread. When you compare numbers between tools, check which one each uses.
  • Setting a swap tolerance far too loose. A loose tolerance does not just allow more slippage; it invites bots to take it. A swap that would have slipped 0.5% can be pushed close to whatever limit you set. See MEV.
  • Setting it too tight and retrying blindly. A tolerance below the normal drift makes swaps fail, and each failed transaction on a public chain can still cost a network fee. Raising it step by step without reading why it failed is how people end up with very loose settings.

What this does not tell you, and what can go wrong

Slippage on the simulated book is computed on a book that stands still. On a real venue, depth can disappear before your order lands, and in a crash the book can empty out completely, so slippage can be far larger than any calculation from a snapshot.

Low slippage only means the trade was cheap to execute. It says nothing about whether the price was a good one, whether the asset is sound, or whether the venue will let you withdraw. A slippage limit protects your fill, not your money.

Questions people ask

What is a good slippage tolerance for a crypto swap?

There is no single good number. It should sit just above the price drift you expect between quoting and execution, which depends on the pool's depth, your size and how busy the network is. Too tight and the swap reverts; too loose and a bot can take the difference.

Is slippage the same as a trading fee?

No. A fee is a stated charge, usually a percentage of the notional. Slippage is the extra cost of filling worse than the best price because of your size and the depth available. You usually pay both, so count both before you trade.

Can slippage be positive?

Yes. If the price moves in your favour between sending and filling, or a better order arrives, you can fill better than expected. In the simulation the book stands still, so slippage measured against the touch is never negative.

How do I reduce slippage?

Trade smaller sizes, use limit orders that cap your worst price, avoid thin markets and quiet hours, and on swaps prefer deeper pools and a tolerance just above the expected drift. None of these removes slippage; they keep it known and small.

Practise it

Reading about a rule is not the same as applying it. These games generate a fresh simulation each round, ask you to make the call first, and grade you against the same rule.

Order Book

Set the largest market order that keeps slippage under the limit. Decrypt shows every level filled and the average price.

What it teaches

AMM Swap

Predict the price impact of a swap in an x*y=k pool, then set the slippage tolerance.

What it teaches