AMMs vs Order Books
Two ways DeFi markets discover prices, with HyperCore CLOBs and HyperEVM AMMs as concrete examples.
Automated market makers and central limit order books solve the same basic problem in different ways. Both let users exchange assets, but they organize liquidity and price discovery differently.
Hyperliquid contains both models. HyperCore runs native order books for spot and perpetual markets, while HyperEVM applications can deploy AMMs through smart contracts.
Order books use explicit prices
In a central limit order book, participants specify the price and quantity they are willing to trade. Buyers post bids and sellers post asks. Marketable orders consume the best available opposite orders, while passive limit orders can wait in the queue.
This structure exposes spread, depth, and queue position directly. It also supports execution controls that professional traders already use, including post only, immediate or cancel, stop orders, and time weighted execution.
The weakness is that a book needs active liquidity providers. A new market can exist technically while still offering poor execution if few traders quote meaningful size.
AMMs use pooled inventory
An AMM holds assets inside a smart contract pool and applies a pricing rule as inventory changes. The trader does not wait for another user's resting order. The pool itself is the immediate counterparty under its contract logic.
This makes permissionless market creation straightforward. A project can seed a pool without first recruiting a full market making operation.
Modern AMMs are more sophisticated than a single constant product formula. Concentrated liquidity can place capital inside chosen price ranges, while specialized designs can incorporate properties such as staking redemptions or external yield.
Liquidity provider risk is different
An order book market maker chooses prices and sizes and can cancel or reprice continuously. An AMM liquidity provider commits inventory to a strategy encoded by the pool.
That creates different risks. AMM LPs can face adverse selection, inventory imbalance, smart contract failure, range management problems, and losses relative to simply holding the assets. Order book makers face inventory risk, queue competition, latency, adverse selection, and operational risk.
Neither structure makes liquidity free.
Hyperliquid also has a hybrid idea
HIP 2 Hyperliquidity automates liquidity while still placing orders into HyperCore's order book. The strategy behaves like automated liquidity provision, but traders execute against ordinary CLOB orders rather than a separate AMM pool.
This is useful because market design does not need to fit a strict AMM versus CLOB binary. Automation can provide liquidity to an order book, and smart contract pools can coexist with native books on the same network.
Choosing between the models
For deep, actively managed markets, a CLOB can provide precise execution and transparent queue based liquidity. For long tail assets or application specific liquidity, an AMM can be easier to bootstrap and compose with other contracts.
The relevant comparison is execution quality, liquidity source, risk, and composability for a specific market.
Continue reading
Read How an Onchain Order Book Works for CLOB mechanics and Project X for a HyperEVM AMM example.