
An AMM (automated market maker) is a smart contract, meaning a program on a blockchain that holds a supply of tokens (usually two) and calculates the exchange price with a formula. There is no order book inside. There is no second trader on the other side of the trade either. You send one token to the contract, the contract recalculates its reserves and hands you the other.
The price here is set by the arithmetic of reserves. Nearly everything that makes an AMM in crypto different from a regular exchange grows out of that fact.
Next, in order: the formula, what a trade costs in a pool, impermanent loss, and the reasons why the usual order book reading can't be applied to an AMM.
On a centralized exchange (CEX), trades are matched by the order book, a list of limit orders to buy and sell. One participant posts an order, another hits it with a market order.
An automated market maker removes the second side. Its role is taken over by a liquidity pool, a contract holding a supply of two assets. The trader trades against the pool, and the pool is filled by liquidity providers (LPs), who deposit tokens and earn a share of the fees.
Why make it so complicated? On Ethereum, an order book turned out too expensive: every order placed and canceled there is a separate transaction that costs gas (the network fee for computation). A formula removes the problem: a quote exists as long as the pool has reserves, and nobody pays gas to update it.
That's why liquidity in an AMM is passive: it sits in the pool, ready to trade at any price the formula produces. And the pool price itself has no idea what's happening on the rest of the market until arbitrageurs pull it into line. The whole category of such protocols is covered in the article "What Is DeFi in Simple Terms", and the comparison of venues is in a separate piece, "CEX vs DEX: Where to Trade Crypto".
The basic model is called constant product. A pool has two reserves: x tokens of the first asset and y tokens of the second. Their product has to stay the same after every trade, that is, x*y=k. The price of token X in tokens of Y at any moment equals the ratio of reserves: P = y / x.
Take a hypothetical ETH/USDT pool holding 10 ETH and 20,000 USDT. Then k = 200,000, and the price inside the pool is 2000 USDT per ETH. The numbers are illustrative and rounded.
A trader wants to buy 1 ETH. After the trade, 9 ETH will remain in the reserve, so the USDT reserve must grow to 200,000 / 9, that is, to 22,222.22. The trader pays the difference: 2222.22 USDT for one ETH against a quote of 2000. That 11.1% premium is called price impact, and the trade itself creates it.
In a pool a hundred times deeper, the picture is different.
Same trade, yet the premium differs by a factor of 111. The rule for constant product is simple: buying 1% of a pool's reserve costs about 1% more than the quote, and buying 10% of the reserve already costs 11% more. Before a swap (an exchange of tokens in a pool), I compare the trade with the reserves, and if I go beyond 1%, I look for a deeper pool or hand the swap to an aggregator that will split it across several pools. That's my personal threshold, not a standard. Depth and spread have their own breakdown: "Liquidity in Crypto".
The calculation leaves out the fee. In a real pool, the fee is first deducted from the incoming amount, and the remainder goes into the formula.
The x*y=k curve has a weak spot: liquidity is smeared across all prices from zero to infinity. That suits a new token, but in a USDT/USDC pair, where the price has stayed near one for years, almost all the capital sits idle. So the AMM family has long been wider than one formula: constant sum (x + y = k), curves for stablecoins (tokens pegged to the dollar), pools with weights other than 50/50. And newer protocol versions let a provider pick a narrow price range (that's how concentrated liquidity works).
For someone who reads order flow, the main difference is in what you can see before the trade. A density level in the order book, meaning a large limit order or a stack of orders at one price, doesn't exist in an AMM, because there are no orders at all. The tape (the stream of executed trades with size and side) arrives in batches, block by block. Clusters (volume by price inside a candle) can be calculated, but there's nothing to check them against. And spoofing and absorption have nowhere to come from: there's no one to post orders for show and no one to take market orders onto themselves, so the price just slides along the curve.
In return, the pool's state is public, and the cost of entry is calculated before the transaction is sent.
The order book itself (limit orders, liquidity, and entry points) is covered in the free lesson on the Secret Terminal YouTube channel. The lesson is part of a full five-part crypto trading course for beginners.
A provider deposits both assets into the pool in a proportion that matches the current price. For an ETH/USDT pool at a price of 2000, that's, for example, 1 ETH and 2000 USDT. In return, the contract issues an LP token that records a share of the whole pool, not the specific coins deposited. In protocols with price ranges, an NFT (a unique token) with the position's parameters is issued instead.
From there, simple bookkeeping takes over.
A 10,000 USDT swap in a pool of 1000 ETH + 2,000,000 USDT at a 0.30% fee: 30 USDT go to the fee, and the trader receives 4.96027 ETH. That works out to 2016.02 USDT per ETH, 0.80% above the quote. Of that, 0.30% is the fee and about 0.50% is price impact.
The nominal size of a pool says little about income. What to look at is the ratio of daily volume to TVL (total value locked, the sum of assets in the pool), because the fee is charged on volume. At a hypothetical fee of 0.30%, a 50 million USDT pool with volume of 200 thousand a day collects 600 USDT a day, or 0.0012% of the capital put in. A 2 million pool with volume of 10 million collects 30,000 USDT, that is, 1.5% a day. Then again, that kind of volume in a small pool usually comes together with a sharp price move.
Stablecoin pools have a different curve: near parity it's almost flat, and in a deep pool, swapping a million USDC for USDT goes through with minimal price impact. The payback comes when the peg breaks. The flat section then works against the provider, and the pool quickly fills up with the asset that lost value. Venues with such pools are compared in the overview "What Is a DEX: Decentralized Exchanges".
Impermanent loss (IL) is how far the value of a pool position lags behind the value of the same assets simply held in a wallet. It's measured against holding, not against the entry point: a position can be in profit relative to what was put in and still lose to the wallet.
The cause is mechanical: the pool has to trade by the formula, and the formula forces it to sell the asset that's rising and buy the one that's falling.
The word "impermanent" is misleading. While the position is in the pool, the divergence can shrink if the price returns to the entry level. On withdrawal, the shortfall is locked in for good. The second term, divergence loss, is more accurate.
In a constant product pool, the size of IL depends only on how many times the price ratio of the two assets has changed, and direction plays no part. The formula: IL = 2 × √r / (1 + r) - 1, where r is the ratio of the new price to the old one, and the absolute value of the result is the shortfall.
The formula is symmetric: a price drop by half gives the same 5.72%, and a drop to a quarter gives the same 20%. A pair of two stablecoins creates almost no IL as long as the peg holds and r stays near one. In a "stablecoin plus volatile altcoin" pair, the altcoin's entire move turns into divergence.
What this formula doesn't show. Concentrated liquidity and contract risk. A range gives more fees on the same capital, but when the price moves past its boundary, the position turns entirely into one asset and stops earning. The divergence mechanism is the same, only the curve is steeper. And contract risk has nothing to do with pool arithmetic at all. A bug in the code, a compromised admin key, manipulation of an oracle (a service that feeds external prices to the contract), a malicious hook (third-party code attached to the pool), and what's at stake is no longer 5.72% relative to holding but the entire position.
All numbers are hypothetical and rounded, and there's no yield forecast in them.
An ETH/USDT pool, price 2000. You deposited 10 ETH and 20,000 USDT (40,000 USDT at the current price) and, for simplicity, own the entire pool. The product k equals 200,000. The price of ETH rose to 4000, and the reserves were recalculated so that the product was preserved and their ratio gave the new price.
The same 5.72% as in the "2x" row. As the price climbed, the pool sold 2.9289 ETH at an average of 2828 USDT, while ETH on the market already costs 4000.
The second half of the calculation is fees, and we'll take a more modest entry. A hypothetical pool: TVL of 1,000,000 USDT, daily volume of 500,000 USDT, a 0.30% fee that goes entirely to providers. The pool collects 1500 USDT a day. Your 1% share (a 10,000 USDT entry) brings in 15 USDT a day. Over 30 days without reinvestment, and with the share and volume unchanged, that comes to 450 USDT.
Now IL on the same entry. You went in 50/50, that is, 5000 USDT and 5000 worth of ETH. Over the month, ETH doubled. Simple holding would have given 15,000 USDT, while the pool position is worth 15,000 × (1 - 0.0572) ≈ 14,142. The shortfall is 858 USDT, fees covered 450 of that, and what's left is minus 408 USDT versus holding.
Change the volume to 2,000,000 a day, and fees give 1800, which covers IL with room to spare. At 100,000 you get 90. At volume of around 950,000, the position would break even against holding. I'd judge a pool by exactly these two numbers: the expected price divergence and the ratio of volume to TVL. The headline APR figure (the annual rate without reinvestment) says less. Neither volume nor divergence is known in advance, so a calculation like this doesn't become a promise of returns.
Three protocols people usually start with when getting to know AMMs in crypto. The parameters were checked against the official documentation on October 1, 2026, but versions and fees change, so reread the primary source before entering a pool.
Uniswap. The protocol that turned the x*y=k formula into an industry standard. In v2 there's one fee for all pools, and since December 2025, after the UNIfication vote, the protocol takes 0.05% out of the 0.30%. The third version brought concentrated liquidity and fee tiers, and new tiers are switched on by a vote of UNI holders. In v4, all pools live inside a single PoolManager contract, hooks appeared, and the pool creator sets the fee, with a hook able to change it on the fly.
PancakeSwap. In v3 on EVM chains (Ethereum-compatible ones), providers get from 66% to 68% of the fee, and the rest is split between CAKE burns and the treasury. On Solana, v3 is built differently: there are 18 tiers, and the split is the same for all of them, 84% to providers and 8% each to burns and the treasury. The Infinity architecture added CLAMM pools (constant product, positions as NFTs) and LBAMM, made of price bins with a constant sum (x + y = k), where a trade inside a bin goes through with no price impact.
Raydium. On Solana, Raydium runs three programs at once. CPMM is a plain constant product with support for Token-2022 (Solana's new token standard). The documentation sends new pairs right here. Concentrated liquidity in the spirit of Uniswap v3 is split out into the CLMM program. In both types, providers get 84% of the fee, 12% goes to RAY buybacks, and 4% to the treasury. AMM v4 is an old hybrid of constant product with the OpenBook order book. It's no longer offered by default: the program was kept for long-standing pairs that need the OpenBook integration.
One protocol often has several versions of its code running, so pools with the same pair name can differ in both depth and fee. You have to check the specific pool: the pair name alone isn't enough.
There's no single answer, and the table shows why. This is specifically about pools: DEXs (decentralized exchanges) with an order book work differently.
For intraday trading and scalping, speed and visibility of the flow decide everything. If you have a second to get into a move, the "sign the transaction and wait for a block" mode doesn't fit, and strategies built on density levels and absorption need an order book, which a pool doesn't have.
Fresh and illiquid tokens are the opposite case. A pool is created without permission, and a token's first weeks of life often play out only on DEXs.
A sensible setup for an active trader: execute trades and read the flow on centralized venues, and keep early tokens and the part of the portfolio under your own keys on DEXs. The first part takes a terminal with an exchange order book. In Secret Terminal, for example, the order book, tape, and clusters are open in one window, and it doesn't show AMM pools.
![[Placeholder: terminal mockup with the order book, tape, and clusters (image: terminal mockup)]](https://api.secret-terminal.com/uploads/mockup_4_804e1393f1.png)
When the pre-trade calculation doesn't work. On March 12, 2025, a trader swapped 220,764 USDC in the USDC/USDT pool on Uniswap v3 and received 5271 USDT. Cointelegraph described it as a sandwich attack: right before the trade, an MEV bot bought the liquidity out of the pool and returned it right after. The whole thing took eight seconds. The transaction didn't go through the Uniswap interface, which has MEV protection and a default slippage tolerance (the limit on how far the execution price can move from the estimated one before the trade is canceled). The trade executed against a pool state that was no longer the one the price had been calculated on.
Typical mistakes. Nearly all of them come down to one thing: a person looks at the rate and doesn't look at the pool.
Reading the order book together with clusters is shown in the free lesson of the same course.
This material is educational and does not contain investment recommendations.
An automated market maker is a smart contract that holds a supply of tokens and swaps them by a formula, with no order book and no second trader. The price is set by the ratio of reserves in the pool, and it changes after every swap. The pool is filled by liquidity providers, who earn a share of the fees for it.
The product of the two assets' reserves in the pool stays constant after a swap. That's why a large trade moves the price by itself: buying 10% of the reserve costs about 11% more than the quote. This is the basic model without fees, and it describes some of the existing AMMs, but not all of them.
Yes. Tokens in a pool can drop in price just like in a wallet, and impermanent loss adds a shortfall versus simple holding: with a 2x price divergence that's 5.72%, with 4x it's 20%. Fees work in the opposite direction and may cover it, or may not. Separately, there's the risk of the contract itself, where you can lose the entire position.
If the price ratio returns to the entry level, the shortfall shrinks to zero. On withdrawal, it's locked in at whatever size it is at that moment. So the wording "impermanent loss" is accurate only until you exit the pool.
The trade itself moves the price. In a 10 ETH pool, buying one ETH costs 11% more than the quote, while in a 1000 ETH pool the same purchase gives a premium of 0.1%. The precise name for this effect is price impact, and slippage is the difference between the estimated and the actual price if the pool changed while the transaction was waiting for a block.
The provider sets a price range within which their capital works, and earns more fees there on the same amount. Outside the range, the position turns entirely into one asset and stops collecting fees. From the outside it looks like a limit order, but if the price comes back into the range, the swap reverses: the position has to be closed with a separate transaction.
In its classic form, no. Scalping needs millisecond execution, free order cancellation, and an order book in front of your eyes. In a pool, a trade waits for a block, there are no orders at all, and the flow of trades is visible only in batches. Add gas and MEV, which eat up small profits, so reading the order book and the tape stays on centralized venues.
In a pool, the price is calculated by a formula, while on an exchange it's formed from the orders in the order book. Secret Terminal shows this part of the market: the order book with a density map, the tape, cluster analysis, and a trade journal. You can trade through it on Binance, Bybit, OKX, MEXC, WhiteBIT, Kraken, and BloFin. The terminal is free and runs on Windows. Download it from the official website, connect your exchange, and see how much is visible before you enter a trade.
Was helpful
Your rating will help us improve the quality of published materials and increase their usefulness.
We publish product updates, setup guides, and practical materials on working with Secret Terminal tools

What working toward a result in trading consists of: the idea, entry and exit conditions, position size, fees and a jour...

How to choose when to trade crypto: volume, spread, news and your own routine. We explain crypto trading sessions and cl...

What a scalper does on an exchange and how the work is set up: short trades, the order book, time & sales, fees and the ...