Tutorials

What Is Crypto Slippage? Calculate the Real Cost from Order-Book Depth

Slippage is the difference between expected and average execution price. Calculate it from order-book levels and separate it from spread and fees.

What Is Crypto Slippage? Calculate the Real Cost from Order-Book Depth

Slippage is the difference between the expected price and the weighted average execution price. It is not a separate exchange charge; it is an execution result produced by available liquidity.

Checked on 2026-07-12 (UTC+8).

Reproducible Example

An order expects to buy ten units at 100. The asks contain:

  • Three units at 100
  • Four at 100.5
  • Three at 101

Average fill = (3×100 + 4×100.5 + 3×101) ÷ 10 = 100.5.

Buy slippage = (average fill − expected price) ÷ expected price × 100% = 0.5%.

That number excludes the trading fee. Spread and fees must be added to estimate total execution cost.

What Increases Slippage?

  1. Order size is large relative to visible depth.
  2. The pair is illiquid and the spread is wide.
  3. News or liquidations move prices during execution.
  4. A market order has no narrow price constraint.
  5. On-chain tolerance is set too wide, increasing execution and possible front-running risk.

Real-World Scenario: A Large Order in a Thin Overnight Book

The same order can cost noticeably more at a different hour. Suppose a pair's book thins out during low-liquidity overnight hours: one unit at 100, two at 100.8, and five at 102. A market buy of five units fills at (1×100 + 2×100.8 + 2×102) ÷ 5 ≈ 101.1—more than 1% slippage against the expected 100—while the identical order during deeper daytime liquidity might average just above 100. Nothing about the order changed; only the liquidity at execution time did. If you must trade during low-liquidity hours, reduce the order size or use a limit order, and compare whether another pair for the same asset offers deeper resting orders.

Practical Controls

  • Read depth, not only the latest price.
  • Split a large order while accounting for additional fees.
  • Use a limit to define the worst acceptable price.
  • Avoid the opening moments of a new listing or abnormal liquidity.
  • Compare real depth across available pairs for the same asset.

Separate Slippage, Spread, and Fee

The fee comes from a schedule. The spread is the gap between best bid and ask. Slippage depends on size, depth, and timing. Record expected price, weighted average fill, quantity, and fee to review a trade honestly.

Continue with market vs limit orders and exchange fee calculations.

Official References

⚠️ Splitting and limiting can manage slippage but cannot remove volatility or non-execution risk.