LeoDexLeoDex
Beginner5 min readUpdated 2026-04-05

AMM vs Order Book: How DEXes Handle Trades

Key Takeaways

  • •AMMs use liquidity pools and a mathematical formula to set prices — no counterparty needed for each trade.
  • •Order books match buyers and sellers directly, like a traditional stock exchange.
  • •Cross-chain DEXes primarily use AMMs (THORChain, Chainflip) because order books are hard to run across multiple chains.

When you swap tokens on a decentralized exchange, the trade needs a mechanism to determine the price and find liquidity. The two primary approaches are Automated Market Makers (AMMs) and order books. Understanding the difference helps you make better decisions about when to use each.

How AMMs Work

An AMM replaces the traditional buyer-seller matching process with a mathematical formula. The most common is the constant product formula: x * y = k. The pool holds reserves of two tokens, and the price is determined by the ratio between them. When you swap token A for token B, you add A to the pool and receive B — the formula automatically adjusts the price based on how much the reserves changed.

The key benefit: you can always trade. There's no need to wait for a counterparty. Liquidity providers deposit tokens into the pool and earn fees on every trade.

The key downside: large trades cause "slippage" — the bigger your trade relative to the pool, the worse your effective price. This is why THORChain offers streaming swaps (splitting large trades into smaller ones) and Chainflip uses JIT concentration (putting all liquidity at your exact price point).

How Order Books Work

An order book lists all open buy and sell orders at different prices. When a buy order matches a sell order at the same price, the trade executes. This is how traditional stock exchanges work, and it's also how some DEXes (dYdX, OpenBook) operate.

The key benefit: no slippage for limit orders — you set your exact price and wait for a match. Professional market makers provide tight spreads on popular pairs.

The key downside: liquidity can be thin for less popular pairs, and you may wait indefinitely for your order to fill.

Why Cross-Chain DEXes Use AMMs

Cross-chain protocols like THORChain and Chainflip use AMM-based designs because order books are extremely difficult to run across multiple independent blockchains. An order book requires instant, synchronized communication between parties — hard when Bitcoin blocks take 10 minutes and Ethereum blocks take 12 seconds. AMMs work asynchronously: the pool is always there, always priced, regardless of when your transaction arrives.

Intent-Based Systems: A Third Way

NEAR Intents and Relay represent a newer approach: intent-based systems. You express your desired outcome ("I want to swap 1 ETH for BTC at the best rate") and professional solvers compete to fill it. This combines the always-available nature of AMMs with the competitive pricing of order books. Solvers can access off-chain liquidity that AMMs cannot, often resulting in better rates.

Frequently Asked Questions

What is an AMM?

An Automated Market Maker uses liquidity pools and a mathematical formula to determine token prices. You trade against the pool, not against another person.

What is slippage?

Slippage is the difference between the expected price and the actual price you receive. It's caused by your trade changing the ratio of tokens in the pool. Larger trades relative to pool size cause more slippage.

Which is better: AMM or order book?

It depends. AMMs are better for always-available liquidity and cross-chain trades. Order books are better for precise limit orders on high-volume pairs. LeoDex uses AMM-based protocols for cross-chain and can also execute limit orders via THORChain.