Level 1 Order Book
Hyperliquid's order book is a first-class citizen of its Layer-1 blockchain. Every limit order posts, modifies, cancels, and fills inside the blockchain state machine - not in validator memory, not off-chain. This means the matching engine is as verifiable and censorship-resistant as the rest of the protocol, with sub-second finality that makes on-chain CLOB execution competitive with centralized exchanges.
Order Book Structure
The order book maintains price-sorted lists of resting buy (bid) and sell (ask) orders. Each price level shows the total size (number of contracts) resting at that price. The distance between the best bid and best ask is the bid-ask spread.
Immutable Block-Based Matching
All orders submitted in the same block are matched atomically. The block leader cannot reorder, inspect, or selectively include orders - every validator independently computes the same matching result.
Depth Chart - Bid/Ask Walls
The depth chart shows cumulative liquidity at each price level. Green bars accumulate bids from the best bid downward; red bars accumulate asks from the best ask upward. Large horizontal steps are "walls" - significant liquidity clusters that can support or resist price moves. Use the slider to simulate market order size and watch it walk up the book.
Order Types
Price-Time Priority Visualization
At each price level, orders are filled oldest-first. Watch how two orders at the same price get different fill outcomes when a taker arrives - Order A (earlier) fills before Order B.
Example: HLP posts 10 BTC bid at $64,000 at T=0. Another participant posts 5 BTC bid at $64,000 at T=5s. A seller sends a market sell for 12 BTC. HLP's 10 BTC fills first; 2 BTC of the second order fills next. The second trader only gets 2 BTC filled - demonstrating why time priority matters for large resting orders.
How the order book works in 90 seconds
Hyperliquid's order book maintains a sorted list of resting limit orders for each perpetual market. The bid side contains buy orders sorted descending by price (highest bid first). The ask side contains sell orders sorted ascending by price (lowest ask first). The spread is the gap between the best bid (highest buyer) and best ask (lowest seller).
When a new order arrives, the matching engine checks if it crosses the spread. A buy order at or above the best ask fills immediately against resting asks. If the order is larger than available liquidity at the best price, it "walks up the book" consuming orders at progressively worse prices until filled or exhausted. Any remaining unfilled quantity posts to the book as a new resting limit order.
The critical property of Hyperliquid's implementation is that all matching happens inside the L1 state machine during block execution. The block leader cannot selectively include, reorder, or inspect orders before matching - every validator independently computes the same result from the same block data. This is what makes the matching engine immutable and prevents the forms of front-running that plague AMM-based protocols.
Key concepts
- Bid-ask spread
- The gap between the highest resting buy price (best bid) and the lowest resting sell price (best ask). The spread is the primary cost for market takers and the primary income for market makers. A tight spread means efficient pricing; a wide spread means higher cost to trade or more profit for liquidity providers.
- Depth / book depth
- The total volume of orders available at each price level, or cumulatively at all price levels within a given distance from mid. A deep book can absorb large market orders with minimal price impact. A shallow book causes large slippage even for moderate-size orders.
- Walk up the book
- When a market order is larger than the available liquidity at the best price, it continues consuming orders at worse prices. A market buy might fill at the best ask, then the next-best ask, then the next - each step at a worse price. The total extra cost from this price progression is the slippage.
- Bid wall / ask wall
- A large individual order or cluster of orders at a specific price level that would take significant volume to consume. In the depth chart, walls appear as near-vertical steps. A large bid wall can act as a support level - price tends to bounce from it because buying pressure would need to absorb the wall before pushing price lower.
- Maker vs taker
- A maker posts a limit order that rests in the book and waits to be filled - they add liquidity. A taker submits a market order (or a limit order that crosses the spread) and immediately fills against resting orders - they remove liquidity. Makers earn a rebate; takers pay a fee. HLP is always a maker, posting both bids and asks.
- FIFO within price level
- First-In-First-Out at each price level means that among multiple orders at the same price, the one submitted earliest gets filled first. This prevents last-mover advantage within a price level and creates a fair, deterministic execution model. A trader who posts first at a given price cannot be bumped by a later order at the same price.
- Atomic block matching
- All orders submitted in the same block are matched simultaneously and atomically - either all fills from the block commit together or none do. This is different from centralized exchanges that may have multiple matching cycles per block. On Hyperliquid, a single block finalizes all pending orders at once, removing any race condition between orders submitted in the same block.
Why an on-chain order book matters
The order book is the fundamental price discovery mechanism in traditional finance. Hyperliquid's achievement is putting that mechanism on-chain without sacrificing performance. By building a custom L1 optimized for order book operations, Hyperliquid bypasses the throughput limitations that make running a CLOB on Ethereum or other general-purpose L2s impractical.
The on-chain nature means the order book is a public good - researchers can analyze liquidity patterns, developers can build analytics tools without API keys, and traders can verify that no participant has preferential access to order flow. This is in stark contrast to centralized exchanges where order book data is a proprietary product and the exchange can trade against customer flow in dark pools.
Frequently asked questions
- How does Hyperliquid's order book differ from a centralized exchange?
- Hyperliquid's order book runs entirely inside its L1 blockchain state machine - every order placement, modification, cancellation, and fill is processed by HyperBFT consensus and permanently recorded on-chain. A centralized exchange like Binance runs its matching engine on proprietary servers, giving the exchange operators full control over order flow, priority, and data. On Hyperliquid, any participant can read the full state of the book from the blockchain directly, without an API key or trusting a data feed.
- What does 'immutable matching engine on a single blockchain block' mean?
- It means that every batch of orders submitted in the same block is matched atomically - all fills from that block are decided together, in that block's execution, with no opportunity for the block leader to reorder or inspect individual orders. This eliminates the possibility of the leader cherry-picking favorable fills or allowing certain participants to get preferential execution. Every other validator can verify the matching result from the block data alone.
- How does price-time priority work?
- When multiple orders can fill at the same price, the order placed earliest gets filled first. If you post a bid at $1,841.50 at 09:00:00.000 and another trader posts a bid at the same price at 09:00:00.500, your order has senior time priority and will be matched before theirs when a seller crosses the spread. This prevents a race condition where two takers at the same price could get different fills depending on who submitted faster.
- What order types does Hyperliquid support?
- Hyperliquid supports market orders (filled immediately at best available price), limit orders (rest in book until filled or cancelled), stop-loss orders (trigger a market order when triggered), and take-profit orders (trigger a limit order at a specified price). The platform plans to add TWAP and VWAP algorithmic order types in future versions. All orders are signed with EIP-712 before submission.
- How does the depth chart visualization work?
- The depth chart displays the cumulative volume available at each price level. As you look further from the mid price, you see how much total liquidity exists at progressively worse prices. For a bid side, each bar represents the total volume of all bids from the best bid down to that price level. For the ask side, it shows the cumulative volume of all asks from the best ask up. Large 'walls' at specific price levels indicate where large orders are resting.
- What is the difference between a bid wall and an ask wall?
- A bid wall is a large buy order (or cluster of orders) at a specific price level that, because of its size, would absorb a significant amount of sell market orders before being exhausted. In the depth chart, it appears as a steep vertical step on the bid side. An ask wall is the equivalent on the sell side. These walls can act as technical support or resistance levels - if a wall is removed (cancelled or filled), price can move rapidly to the next level.
- How does the HLP vault participate in the order book?
- The HLP vault posts large bid and ask limit orders on both sides of every perpetual market, sitting slightly inside the best bid and best ask. When a taker crosses the spread, HLP's order is filled and earns the bid-ask spread. HLP's orders are visible to everyone in the on-chain order book state - anyone can inspect exactly what size and price HLP is quoting at any moment, making the vault's market-making activity fully transparent and auditable.
- Why does order book transparency matter?
- On centralized exchanges, large orders can be hidden in 'dark pools' or 'iceberg' order types that only reveal a fraction of their true size. This opacity allows exchange operators and favored participants to profit from information asymmetry. On Hyperliquid's on-chain order book, every resting order is visible in the blockchain state. Any participant - from a retail trader to an arbitrage bot - can read the full depth and make trading decisions with the same information available to everyone else.