BTC—ETH—SOL—XRP—BNB—ADA—DOGE—TRX—LINK—AVAX—DOT—LTC—
Live

What an automated market maker is and how pools price trades

An automated market maker prices crypto trades with a formula instead of an order book. This guide explains liquidity pools, the constant product formula, slippage, and how liquidity providers earn fees, with plain worked examples and the real risks to weigh.

By BTC Newz Editorial

Published · 8 min read

An automated market maker (AMM) is a type of decentralized exchange that prices trades with code and math instead of an order book. It runs on smart contracts. You trade against a shared pool of tokens, not against another person's posted offer. Prices come from a simple formula that reads the pool's balances. This guide shows how that works, step by step, with round numbers you can follow.

What an automated market maker is

Picture a normal exchange first. A buyer and a seller post orders, and a match makes a trade. An AMM skips the match. Software holds the tokens and quotes a price when you ask. Anyone can trade at any time, as long as the pool holds funds.

Traditional order books rely on buyers and sellers posting competing offers, and trades happen only when prices meet, as Uniswap's own explainer puts it. AMMs drop that back and forth. They price trades right away with code. That design is what lets small or new tokens trade around the clock, without a paid market maker on standby.

Most decentralized exchanges use this model. It moved trading from a company's order book onto open smart contracts that anyone can read. You keep custody of your coins until the swap runs. There is no sign up and no broker in the middle.

Custody is the other big change. On a normal exchange, the company holds your coins while you trade, and it settles the deal for you. With an AMM, your wallet signs the swap and the tokens move in one on chain step. You do not hand your funds to a firm to hold. That shift is why people call these markets self custodial.

How a liquidity pool holds two assets

A liquidity pool is a smart contract that holds reserves of two tokens, for example Ether (ETH) and USD Coin (USDC). Traders swap one token for the other by adding to one side and taking from the other. The pool acts as the counterparty for every trade. No order needs to match.

People who supply those tokens are called liquidity providers. They deposit both assets and, in return, get a claim on the pool and a share of trading fees. Think of it like a shared vending machine. Many people stock it, and each restocker earns a slice of the coins that go in.

Each pool is its own market for one pair. A separate contract holds ETH and USDC, another holds a different pair, and so on. Deposits usually go in at the pool's current ratio of value. That keeps the two sides balanced at the moment you join.

Pools can hold more than two tokens in some designs, but the two token pool is the model to learn first. Its math is the clearest. Once you see how a pair prices a swap, larger pools follow the same idea. Start with the pair.

How the constant product formula works

The most common AMM design uses one rule: x times y equals k. Here x and y are the amounts of each token in the pool, not their dollar values. k is a fixed number, the product of those two amounts. After each trade the pool must keep k the same or larger.

Say a pool holds 10 ETH and 20,000 USDC. Multiply them and k equals 200,000. Price comes from the ratio of the reserves, so 1 ETH costs 2,000 USDC here. Change the balances and the price changes with them.

This rule draws a curve, not a straight line. As one token grows scarce in the pool, its price climbs faster. The formula never fully runs out, because the price rises steeply as a reserve nears zero. That math is what stops a pool from being emptied in one trade.

One more point helps here. The formula sets a price for any trade size, so the pool always has a quote ready. There is no moment when buyers and sellers fail to meet. That is the point of the design. Liquidity sits there, at some price.

How a swap moves the price

A swap changes the token balances, and the formula sets a new price to match. Buy ETH from our pool and the ETH reserve falls. To hold k at 200,000, the USDC reserve must rise. The bigger the trade, the worse the price you get. That effect is called slippage.

Here are the numbers. Start with 10 ETH and 20,000 USDC. Buy 1 ETH and 9 ETH are left. To hold k at 200,000, the USDC side must reach about 22,222.22, so you pay about 2,222.22 USDC for that single ETH. The spot price was 2,000 USDC, so you paid about 11 percent more.

Now push the trade harder. Buy 2 ETH instead of 1 and 8 ETH remain. The USDC side must reach 25,000, so 2 ETH cost 5,000 USDC. That is 2,500 USDC each, 25 percent above the 2,000 start price.

Same pool, worse fill.

People often assume a quoted price is the price they pay. In an AMM, it is not. The quote reflects the pool before your trade lands, and your own order moves it. On a deep pool that move is tiny. On a thin one it can cost you real money.

What liquidity providers do and how they earn fees

Liquidity providers fund the pool so traders have something to trade against. Each swap pays a small fee, often a fraction of a percent, and that fee goes to providers in proportion to their share of the pool. On Uniswap, swap fees accrue to liquidity providers by design. Fees are the main reason to supply a pool.

Providers do not set a price or place an order. They deposit both tokens and let the contract do the work. Their reward grows with trading volume, so a busy pool pays more in fees than a quiet one. That income is not fixed, and it is not promised.

Fees stack up trade by trade and get added to the pool. When a provider withdraws, they take out their share of the reserves plus the fees earned along the way. More volume means more fees. Slow markets mean thin returns.

A deeper pool spreads those fees across more providers, so each share is smaller. A thinner pool pays a bigger cut to fewer people, though it also tends to see fewer trades. Providers weigh that balance. Fee income and trade volume rise and fall together.

Impermanent loss, explained with numbers

Impermanent loss is the gap between what your deposit is worth inside the pool and what it would be worth if you had just held the two tokens. It shows up when the prices of the pooled tokens move apart. Arbitrage traders rebalance the pool toward the new market price. You end up holding more of the token that fell and less of the one that rose.

Try a round example. Deposit 1 ETH and 1,000 USDC when 1 ETH equals 1,000 USDC, so your stake is worth 2,000 USDC. Now the price of ETH doubles to 2,000 USDC. Arbitrage shifts the pool to about 0.7071 ETH and 1,414.20 USDC. Withdraw then and you hold about 2,828.40 USDC of value.

Holding would have done better. Your 1 ETH would be worth 2,000 USDC and the 1,000 USDC stays put, for 3,000 USDC in all. The pool leaves you with about 2,828.40 USDC. That gap of 171.60 USDC is a 5.7 percent impermanent loss, the same figure Chainlink uses in its worked example.

Impermanent loss earns its name. If the price drifts back to where you started, the gap closes on its own. It only turns real when you withdraw while the prices sit apart. Trading fees can cover the gap, but only when they add up to more than the loss.

Risks and limits to know

Providing liquidity carries risks beyond impermanent loss. A pool is only as safe as its smart contract, and a bug can drain the funds inside. Low liquidity means high slippage, so a trade in a small pool can move the price a lot. New or unaudited pools can hide bad code or an outright scam.

None of this means you should stay away. It means you should look before you act. Check whether the contract has been audited by a known firm. Study how deep the pool is at the pair you want. And keep in mind that fees may or may not beat impermanent loss over the time you stay in.

No one can promise what a pool will return. Prices move, volume shifts, and code can fail. What this guide gives you is the mechanism, so you can judge a pool on its own terms rather than on a slogan.

Frequently asked

What is the difference between an AMM and an order book exchange?

An order book exchange matches a buyer's bid with a seller's ask, so a trade needs two people who agree on a price. An automated market maker prices trades with a formula against a shared pool of tokens. You trade against the pool at any time, and no matching order has to exist first.

How does a liquidity pool set the price of a token?

A liquidity pool holds two tokens, and the price comes from the ratio between their amounts. A common design keeps the product of the two amounts constant, written as x times y equals k. When a trade shifts the balances, the formula quotes a new price. Bigger trades move the price more, which traders feel as slippage.

Can liquidity providers lose money?

Yes. Fees are not guaranteed, and providers face impermanent loss when the pooled prices move apart, which can leave a position worth less than simply holding the tokens. Smart contract bugs and low liquidity add more risk. Providers only come out ahead when the fees they earn beat those losses over the time they stay in.

Sources

  1. What is an Automated Market Maker? (September 26, 2026)
  2. How Uniswap Works (September 26, 2026)
  3. Understanding Impermanent Loss in DeFi Liquidity Pools (September 26, 2026)