Learn How token trades find a price: order books, pools and aggregators

SUIBROKERS DAO · field note

How token trades find a price: order books, pools and aggregators

A concrete explanation of how order books, liquidity pools, and aggregators produce the price and route a trader reviews.

OPEN THE APP ALL NOTES
16-bit pixel-art dispatch floor where a blond router sends one order toward an order book and a shared liquidity pool.

You enter an amount and a trading screen returns an output. What set that price? The answer may involve an order book, a liquidity pool, an aggregator, or a route that combines more than one source. Those words describe different jobs, so using them interchangeably makes a quote harder to understand.

An order book fills by price levels

An order book lists bids and asks at price levels. Buyers show what they will pay; sellers show what they will accept. The gap between the best bid and best ask is the spread. Depth is the amount available around those prices.

Imagine a hypothetical book with 0.4 token offered at 99.50 USDC and another 0.6 token offered at 100.50 USDC. A marketable buy for 1 token cannot fill entirely at the best ask. It takes 0.4 at 99.50 and 0.6 at 100.50, for a total of 100.10 USDC and an average fill of 100.10 USDC per token. If the best bid is 99.00, the visible spread is 0.50 USDC, while the buyer’s average price is higher because the order reached a second level. A limit order can avoid accepting a worse level, but it may wait or fill only partly.

Sui’s DeepBook documentation describes a native central-limit-order-book primitive. When reading an order-book route, ask how much depth sits near your size, which levels your order may consume, and whether the order type can leave you waiting.

A pool changes its own price

An automated market maker, or AMM, uses a pool of assets and a pricing rule instead of matching your order against a visible list of bids and asks. Uniswap’s pool explanation uses a two-asset pool and the constant-product relationship x * y = k as a simple model. Each trade changes the reserves, so the amount received depends on pool depth and order size.

Hypothetical arithmetic: imagine a pool with 10 SUI and 1,000 USDC, and ignore fees. Its starting product is 10 * 1,000 = 10,000. If a trader adds 100 USDC, the simplified rule leaves about 10,000 / 1,100 = 9.09 SUI in the pool. The trader receives about 10 - 9.09 = 0.91 SUI.

The starting spot price was 100 USDC per SUI. The trader’s average price is about 110 USDC per SUI because the order moved along the curve. The reserve ratio changes too. That is price impact: the trade changes the pool while it is being filled. Real pools also account for fees, token decimals, concentrated liquidity, and the exact route, so this calculation explains the direction of the effect rather than producing a live quote.

An aggregator chooses a route

An aggregator works at the routing layer. It requests or compares liquidity from one or more sources and returns a path for a particular pair and amount. It may choose an order book, one pool, several pools, or a split across venues.

For example, a hypothetical 100 USDC swap might send 60 USDC through one deep pool and 40 USDC through an order-book level because that combination gives the router more usable depth. If the first pool’s reserves change or the order-book level disappears, the same pair and amount can produce a different split. A route may also change when a source expires, becomes unavailable, or has a different fee. “Aggregator” describes how the path is selected; it does not guarantee a universal best price.

Read the quote that came back

For your amount, inspect the exact input and output assets, quoted output, minimum received, price impact or spread, route or venue, fees, gas, and freshness. Slippage is a limit for execution, not a prediction of the market. Keep a product commission separate from network gas and from venue price impact. A “best price” label is meaningful only alongside the amount, sources, time, and conditions that produced it.

Sui’s transaction payment documentation describes programmable transaction blocks that can compose several operations. The current Sui Brokers Swap surface requests a Bluefin 7K route for a connected Sui mainnet wallet; its 30 bps commission is a product term, separate from Sui gas, an order-book spread, and AMM price impact.

When you review a real action, compare the route and quote with what you meant to trade, then read the wallet prompt once before signing. After execution, a confirmed digest or history record tells you what happened; it does not turn the hypothetical examples above into a promise about the next quote. The Swap guide covers that product flow, and what makes Sui different explains the transaction model underneath it.

Make your
next move.

Open the app to swap on Sui, explore The Desk, and track your Points.

OPEN APP Connect your Sui mainnet wallet when you are ready to act.