Perps Guide
Liquidity and Slippage

Foundations · Ch. 02

Liquidity and Slippage

The screen says the price is $3,000. You buy a lot, and your average comes out at $3,000.60. The first few coins were cheap. The rest cost more. You just paid for the market’s depth.

The Idea

Intuition

In Chapter 1 the best ask was a single price. But there’s only ever a little size sitting at that price. Right behind it are more sellers, each asking a bit more than the last.

So a big order can’t fill in one place. It works its way up the book, taking the cheapest offers first and then reaching for pricier ones. By the time you’re done, your average price is worse than the best ask you started at. That gap is slippage.

Liquidity is just how much size is stacked up waiting. A deep book barely flinches when you trade. A thin one lurches. Same order, two very different bills. Drag the order size in the panel and watch what you actually pay.

This is why size matters so much in markets. It’s also why, later on, a liquidation dumping a huge position into a thin book can shove the price around all by itself.

The Math

How It’s Calculated

In plain terms: your fill price is the size-weighted average of every offer you consumed, and slippage is how far that average landed above the best ask.

Fill an order across levels with prices pip_i and filled sizes qiq_i. Your average price is the size-weighted mean:

avg=ipiqiiqi\text{avg} = \frac{\sum_i p_i \, q_i}{\sum_i q_i}

Slippage is how much worse that average is than the best price you saw:

slippage=avgbest askbest ask\text{slippage} = \frac{\text{avg} - \text{best ask}}{\text{best ask}}

Two things push it up: a bigger order (you reach deeper) and a thinner book (less size at each level). Liquidity is the cure for both.

you overpaid
$0.00
avg $3000.20 · 0.00% over best ask
$3000.20
$3000.40
$3000.60
$3000.80
$3001.00
$3001.20
Depth: offers stacked at rising prices.