Reading the order book
The order book is execution context, not certainty.V2: on-chain BST depth
In QuantDesk V2, displayed depth comes from crankless BST slabs — bid and ask red-black trees stored inside eachMarketV2 account. Matches happen atomically in place_order_v2 without waiting for an off-chain keeper.
Integrators can fetch aggregated depth via:
redis vs database fallback).
V2 crankless BST matching
V1 relied on hybrid models where off-chain keepers could delay or batch matching. V2 moves matching on-chain into a bounded Binary Search Tree (BST) slab per market side (bids and asks).V1 vs V2 execution
How a trade flows
Key properties:- No crank for core fills — takers match against resting liquidity in the same transaction they submit.
- Bounded slabs — each side caps at 256 nodes so compute stays within Solana CU limits.
- Seat gate — makers claim a
MarketSeatPDA before posting limit orders (spam protection).
What to watch
- Spread: tighter is usually easier execution
- Near depth: more depth can reduce slippage
- Imbalance: useful context, not a standalone signal
Practical habits
- Check spread before urgent orders
- Compare size against near depth
- Prefer staged entries in thin liquidity
- Re-evaluate after partial fills