Skip to content
Request a review

Hyperliquid Architecture · The Hyperliquid L1 · 3/8

The On-Chain Order Book

Why a CLOB?

Hyperliquid uses a Central Limit Order Book (CLOB) — the same model used by every major centralized exchange (Binance, NYSE, CME). In a CLOB:

This is fundamentally different from AMMs (Uniswap, Curve) where liquidity is provided through mathematical formulas rather than discrete orders.

Order Types

Hyperliquid supports a rich set of order types, comparable to centralized exchanges:

Basic Orders

Advanced Orders

Matching Engine

The matching engine is part of HyperCore, the chain's execution state. There is no separate off-chain matching server: every validator executes the same ordered transactions and arrives at the same book state.

  1. A signed order is sent to an API server or node, which gossips it to the validators
  2. Consensus orders it into a block alongside other transactions
  3. Every validator executes the block and checks the opposing side of the book
  4. If a match exists (bid >= ask), the trade executes; margin is checked for both sides
  5. Partial fills are supported — the remainder rests on the book
  6. Price-time priority: better price first, then earlier placement

Because matching happens inside consensus, the book itself, every fill, and every resulting position are part of the verifiable chain state.

No Gas for Order Actions

One of Hyperliquid's most important design decisions is no gas fees for order operations. Placing, modifying, and cancelling orders costs no gas; trading fees are charged only when an order fills. This is critical because:

The L1 achieves this by treating order operations as native HyperCore actions rather than smart contract calls. Spam is controlled instead by address-based rate limits that grow with an account's cumulative traded volume (rate limits).

Funding Rate Mechanism

For perpetual futures, Hyperliquid uses a funding rate mechanism to keep perp prices anchored to spot:

See the funding docs for the exact formula.

This creates an incentive for traders to take the side that receives funding, which pushes perp prices back toward spot.