AMM (Automated Market Maker)
An automated market maker, or AMM, is a type of decentralized exchange that prices trades with a mathematical formula against a pool of tokens, instead of matching buyers and sellers in an order book.
How an AMM works
An AMM runs as a smart contract holding a liquidity pool, for example a pool of ETH and USDC. Anyone can trade against the pool: you add one token and take out the other. The price is set by a formula based on how much of each token the pool holds.
The best-known formula, popularised by Uniswap, is the constant product formula x × y = k. The amounts of the two tokens, multiplied together, must stay the same after each trade, ignoring fees. Buying one token makes it scarcer in the pool, so its price rises automatically.
An example
Say a pool holds 10 ETH and 20,000 USDC, so k is 200,000 and the implied price is 2,000 USDC per ETH. You want to buy 1 ETH. After the trade the pool must hold 9 ETH, so it needs 200,000 ÷ 9 ≈ 22,222 USDC. You pay about 2,222 USDC plus the fee, an average of 2,222 per ETH instead of 2,000. That difference is price impact, and it grows the larger your trade is relative to the pool.
Who provides the liquidity
The tokens in the pool come from liquidity providers, who deposit both tokens and receive a share of the trading fees. Arbitrage traders keep the pool price in line with other markets by trading whenever it drifts. Newer designs concentrate liquidity in price ranges or use different curves for assets that should trade near the same price, such as two stablecoins.
Risks and limits
For traders, thin pools mean high slippage, and pending trades can be targeted by sandwich attacks. Setting a sensible slippage limit helps.
For liquidity providers, the main risk is impermanent loss: when prices move, the pool automatically sells the rising token and buys the falling one, which can leave you worse off than simply holding. Smart contract bugs and pools for worthless or malicious tokens are further risks.
Ask Coach about it
Coach is the AI on AtenaCrypto. It explains crypto with live market data, in plain words.
How does the constant product formula decide the price I get when I swap on an AMM?Ask Coach →
Frequently asked questions
What is the difference between an AMM and an order book?
An order book matches individual buy and sell orders at prices traders choose. An AMM lets you trade against a pool, with the price set by a formula and the pool's balances.
Why do I get a worse price on large AMM trades?
Each unit you buy makes the token scarcer in the pool, so the price moves against you as the trade fills. Larger trades relative to pool size suffer more price impact.
How do AMM liquidity providers earn money?
They receive a share of the trading fees charged on every swap, in proportion to their share of the pool. Impermanent loss can offset these earnings.
Related terms
Learn it step by step
AC Learning explains these ideas in interactive lessons — the first eight sections are free.
Open AC Learning → Create a free accountAll glossary terms · Educational reference only — not investment, legal, tax or financial advice.