AMM vs Order-Book DEX: How Crypto Prices and Fills Work
Compare how automated market makers price swaps, how order-book DEXs match orders, and what liquidity providers and traders should check.
In this guideTwo ways to create a market
Short summary
An AMM calculates a swap against pooled assets; an order book matches buy and sell orders at posted prices. Either model can have thin depth, changing quotes, fees, and execution risk. The label alone cannot rank venues.
Two ways to create a market
A decentralized exchange can arrange trading around a pool of assets or around a list of orders waiting at different prices.
Both let a trader exchange one token for another, but they answer a basic question differently: where does the next executable price come from?
In an automated market maker (AMM), a trader swaps against assets held in a pool. A rule tied to the pool’s state determines the amount received.
In an order-book venue, buyers and sellers submit orders with a price and size; matching logic pairs compatible orders.
“DEX” describes a broad category, not one trading mechanism. It also does not guarantee that every matching step, custody arrangement, or settlement action is identical across venues.
This guide uses Uniswap’s AMM documentation and HyperCore’s order book as examples of particular designs.
How an AMM pool forms a quote
A simple constant-product pool holds two token reserves, often written as x and y, and follows x × y = k in a fee-free illustration.
If the pool holds 1,000 ETH and 2,000,000 USDC, its starting reserve ratio is 2,000 USDC per ETH. A swap that removes ETH and adds USDC changes both reserves, so the next quote moves along the pool’s pricing curve.
The trader does not need another user to have posted an order at that exact moment. The pool can quote a trade as long as usable liquidity remains and the transaction satisfies its limits.
A larger trade relative to available liquidity generally travels farther along the curve and has a worse average price than a smaller trade.
Real pools add protocol-specific details. Fees affect the amount credited to the pool, and concentrated-liquidity designs can have different amounts available at different prices.
In Uniswap v3, for example, providers choose a price range; liquidity outside that range is inactive until the price returns.
The pool’s formula, version, fee tier, and active liquidity all matter, so a two-reserve example is not a quote for every AMM.
How an order book forms a fill
An order book collects bids to buy and asks to sell. Each order specifies a price and size, and the venue applies rules to decide which compatible orders meet.
HyperCore documents price-time priority: better prices rank first, then earlier orders at the same price. Other venues can use different matching and sequencing rules.
A marketable buy takes available asks, beginning at the best ask. If its size is larger than the quantity posted at that price, it can continue into higher ask levels.
A limit order can set a price boundary, but it may fill only partially or not at all if other traders do not meet it.
Hyperliquid’s order-type guide describes examples such as resting and immediate-or-cancel behavior; those mechanics are venue-specific.
Unlike an AMM curve, an order book does not promise a continuous quote at every price. Displayed depth can be thin, orders can be changed or canceled, and execution can stop when the specified size or price condition is no longer available.

Worked example: buying 100 ETH
Use a hypothetical starting reference price of 2,000 USDC per ETH. These examples intentionally use different liquidity profiles to show the mechanics; they do not rank the two venue types.
For the AMM example, assume fee-free constant-product reserves of 1,000 ETH and 2,000,000 USDC. The product is 2,000,000,000. To receive exactly 100 ETH, the ETH reserve falls to 900.
Keeping the product constant requires about 2,222,222.22 USDC in the pool, so the trader supplies about 222,222.22 USDC. The average price is about 2,222.22 USDC per ETH, 11.11% above the starting reserve ratio.
Fees and gas are excluded.
For the order-book example, suppose the midpoint is 2,000, with a best bid of 1,999 and a best ask of 2,001. The asks are 20 ETH at 2,001, 30 ETH at 2,010, and 50 ETH at 2,030.
Buying 100 ETH across those levels costs 201,820 USDC, an average of 2,018.20 per ETH, or 0.91% above the midpoint. This assumes the displayed quantities remain available and excludes fees and gas.
The difference comes from the assumed pool reserves and order-book depth, not a universal advantage of one design.
A deeper pool, a thinner book, another fee schedule, a price move, or different routing could change the result. The AMM calculation also assumes no fee; actual pool rules can require more input for the same output.
Liquidity providers take different roles
An AMM liquidity provider deposits assets into a pool and shares in eligible swap fees under that pool’s rules. The provider usually does not choose a separate ask price for each trade.
As swaps move the pool price, the provider’s token mix can change.
A concentrated position can stop earning fees while the market is outside its selected range, and price changes can create a different outcome from simply holding the starting tokens.
An order-book maker chooses a price and size, then leaves an order available for others to trade against. The maker can revise or cancel an order subject to the venue’s rules.
A fill may be partial; once filled, the maker’s inventory changes. The maker faces the risk that the market moves after an order rests, and a displayed maker fee or rebate is not guaranteed profit.
These roles are not mutually exclusive strategies. One participant could use an AMM in one market and place orders in another.
In either model, capital can be exposed to asset-price moves, execution costs, and contract or venue risks. Uniswap’s LP-fee guide describes its specific provider mechanics; it does not define every AMM.
What can make the executed price differ
The AMM’s curve or the book’s visible orders describes only part of execution. A trader should distinguish a reference or midpoint price from the average price for the intended size.
In a pool, the trade changes reserves as it proceeds. In a book, it may consume several price levels. Both effects are commonly discussed as price impact, though the exact displayed calculation can vary by interface.
Slippage is a separate timing issue: the market or available liquidity may change between a quote and execution. A swap may include a minimum-output limit, while an order may use a limit price or time-in-force rule.
Those protections constrain certain outcomes; they do not guarantee a fill or eliminate fees, failed transactions, or price movement.
Compare the actual route, size, fee, network cost, and rules for the venue you plan to use. A router can split a swap across pools, and a book can route or match orders according to venue-specific logic.
The best displayed price may not be the best net execution after all costs. Uniswap’s guide to price impact and slippage explains why those measures describe different effects.
The venue model does not define custody or safety
An AMM and an order book describe how liquidity is quoted or matched; neither label alone says who controls assets, which code executes a trade, how a chain orders transactions, or when settlement is final.
Uniswap pools and HyperCore are concrete implementations with their own architecture. Another DEX can combine onchain contracts, offchain interfaces, sequencers, routers, or other components.
On public chains, transaction ordering can affect an AMM swap that waits before inclusion. Ethereum’s MEV guide describes how transaction ordering can create value opportunities around pending transactions.
That does not mean every AMM trade is attacked, nor does using an order book automatically remove ordering, custody, oracle, or operational risks.
Before trading, check the exact contract or venue, supported network, asset pair, order or swap limits, fee rules, and available exit path.
For larger trades, compare a fresh quote with the depth and conditions that apply to the full size. Avoid treating a model name, audit badge, or interface estimate as a guarantee.
A practical comparison checklist
Start with the market itself: confirm the token contract or asset identifier, chain, venue, pool version or order book, and whether the market is active. Similar tickers can refer to different assets or markets.
For an AMM, inspect the pool’s active liquidity across the price range your trade could traverse, the fee tier, and whether a concentrated position is in range.
For an order book, inspect both sides, the quantity at each price, tick and lot constraints, order types, and whether a limit order could remain unfilled.
Estimate the total cost for your intended size rather than comparing only a displayed spot price or fee rate.
Include protocol fees, network fees, spread, price impact, potential quote movement, and any routing or withdrawal cost that applies.
If you are supplying liquidity or making orders, also consider inventory exposure, provider-specific rules, and what happens when the market moves quickly.
For LP exposure, see the AMM liquidity-pool and impermanent-loss guide.
For swap execution, see the DEX slippage and price-impact guide.
For a protocol-specific order-book example, see the Hyperliquid HIP-3 guide.
Common questions
Q1Is an AMM always worse for a large trade?
No. The result depends on active pool liquidity, the curve and fee rules, the route, and the size of the trade. An order book can also have shallow depth or rapidly changing orders. Compare executable quotes for the full size.
Q2Is an order-book DEX the same as a centralized exchange?
No. An order book is a matching design. A decentralized venue may use onchain state or other components, while custody, settlement, and governance depend on its particular architecture. Read the venue’s documentation rather than inferring those properties from “order book.”
Q3Does providing AMM liquidity work like placing a limit order?
Not in general. A pool position exposes capital to swaps according to the pool’s pricing and liquidity rules. A limit order states a price and size under a matching venue’s rules. Some concentrated positions can resemble a range order in limited conditions, but the mechanics and risks differ.
Sources and further reading
Report an issue
We’ll prepare an email with this article link. Mark receives the report only after you send it
Quick check
Read the guide? Check yourself with 3 questions
Question 01
Where does a basic AMM swap quote come from?
Choose an answer to see the explanation
Options glossary
A call or put whose strike is near the underlying price; it has little intrinsic value and often substantial sensitivity to time and volatility.
Read the deeper guideCall optionA contract that gives its holder the right, but not the obligation, to buy the underlying at the strike before or at expiration under the contract terms.
Read the deeper guide