
What Is an Automated Market Maker (AMM)? How AMMs Power DeFi Trading Without Order Books
No buyer waiting on the other side. No order book at all. Swap goes through anyway, at a rate nobody typed in anywhere. Catches people out the first time, and the answer is a bit of code sat on two piles of tokens, doing one sum.
What Is an Automated Market Maker: Definition
An automated market maker is a program that quotes a price off a formula instead of off other people's orders. It holds a reserve of two tokens, anyone can trade against it at any hour, no counterparty needed on the far side.
That is the whole trick of it. A normal exchange needs somebody selling before you get to buy. An AMM needs nothing except tokens already sat in the pool, because the pool is the counterparty. Anyone asking what is AMM in crypto is really asking how a trade completes with nobody on the other end, and the answer is the code will always take the other end.
Strip the jargon off and what is automated market maker logic comes down to arithmetic. Two balances, one equation, and a rate that falls out of whatever those balances happen to be at that second. No bids. No asks. Nothing matching anything.
The automated market makers crypto traders use most sit on Ethereum and its cheaper offshoots, though the design has been copied onto more or less every chain that can run code.
How AMMs Replace the Order Book with a Liquidity Pool

An order book is a list. Buyers down one side with the prices they will pay, sellers down the other with the prices they want, and a matching engine pairing them off whenever the two overlap. Works well in a busy market. Works badly in a quiet one, because a thin book means your order either sits there unfilled or it gets filled somewhere awful.
A liquidity pool chucks the list out. People deposit both tokens of a pair into a contract, that contract holds the combined reserves, and traders swap against those reserves direct. What makes the whole arrangement work is the rules live inside a smart contract, so nobody has to be online, agree to anything, or approve a trade for it to settle.
So what are automated market makers replacing, exactly? Two things. The order book, and the firm that used to sit behind it. The Uniswap AMM popularized this design in 2018 and most pools running today are some variation on it.
And what are AMMs doing that an exchange does not? Guaranteeing a quote at every size, all the time, four in the morning on a token with eleven holders included. Quote might be terrible. There will always be one.
Automated market makers get their liquidity off depositors, not off professional firms that can walk away on a bad morning.
Pool never turns a trade down, though it can make one very expensive.
Anyone can open a market for any pair, which is exactly as useful and as dangerous as that sounds.
Settlement happens on chain, so the trade either goes through or it reverts. Nothing in between.
The Constant Product Formula: x*y=k
Most pools run on one single line: x times y equals k. x is how much of the first token is in the pool, y is how much of the second, k is the number the contract will not let change during a swap.
Take tokens out one side and you have got to put tokens into the other, in whatever amount keeps that product the same. Exchange rate at any given moment is just y divided by x. Pull more x out and the x that is left gets scarcer, so the rate on the next unit moves against you.
Plotted out this draws a curve that never touches either axis, and that shape is doing real work. Pool can never be fully drained, because emptying one side completely would mean paying an infinite amount of the other. Small trades sit on a nearly flat stretch of that curve and barely shift the rate. Big ones ride up the steep part, and that is where slippage comes from. It is not a fee anybody charges. It is the geometry.
How a Swap Changes the Price: Worked Example
[Image, ALT: "How a swap changes the price in an automated market maker pool"]
Numbers get there quicker than description does. Take a pool holding 10 ETH and 20,000 USDC. Fees left out to keep the sum clean.
k is 10 times 20,000, so 200,000. Starting rate is 20,000 split by 10, which gives 2,000 USDC per ETH.
A trader puts in 2,000 USDC. USDC side of the pool is now 22,000.
k has to stay at 200,000, so the ETH side drops to 200,000 divided by 22,000. That is 9.0909 ETH.
Trader gets the difference out: 10 minus 9.0909, or 0.9091 ETH.
Now work out what they actually paid. 2,000 split by 0.9091 comes to roughly 2,200 USDC per ETH, not the 2,000 that was showing before they clicked the thing.
And the pool has moved. New rate is 22,000 over 9.0909, or 2,420 USDC per ETH, sat there waiting for whoever trades next.
Two things came out of the one swap. Trader paid over the rate that was quoted, and the pool repriced itself for everyone behind them. That is price impact, and in a pool this small it is enormous. Ten percent over the screen rate on a 2,000 dollar trade is not a rounding error.
Depth is the only thing that fixes it. Run the identical trade against a pool holding 10,000 ETH and 20,000,000 USDC and the effect more or less vanishes off into the decimals. Nothing about the formula changed. Only the size of the pile did.
The Role of Arbitrage in Keeping AMM Prices Accurate
That pool is now quoting 2,420 while the rest of the market is still sat at 2,000. Nothing inside the contract knows this or cares. An AMM has no idea what anything is worth anywhere else and it never goes and looks.
Arbitrage is the fix, and nobody built it as a feature. It is a gap somebody wants.
A trader sells ETH into that pool because the pool is paying over the odds for it. Pushing the rate back to 2,000 takes 0.9091 ETH going in and 2,000 USDC coming out, which is the first trade run backwards. They bought that ETH outside at 2,000 and sold it to the pool at an average of 2,200, so roughly 182 dollars gross, less gas and less the pool fee.
Do that a few thousand times a day across every pool that exists and pool prices end up tracking the wider market without anything actually joining the two together. Same pattern turns up wherever one asset trades in two places at once, and traders running multi chain arbitrage close those gaps for the identical reason. Gap is the wage.
One consequence of this gets glossed over a lot. Arbitrage profit comes out of the pool, which means it comes out of the depositors. People supplying the liquidity are the ones paying to keep the exchange rate honest, they get paid back in trading fees, and whether that trade works out for them depends entirely on how busy the pool is.
AMM vs Traditional Market Maker: Key Differences
Short version of automated market making set against the old model: a firm chooses to quote and it can stop. A pool runs a formula and cannot stop, and does not choose anything. One is a decision. Other one is a rule.
Automated market maker | Traditional market maker | |
|---|---|---|
How a quote is made | A formula run over whatever is in the pool | A person or a firm posting bids and asks, by choice |
Who puts up the capital | Anyone who deposits into it | The firm's own balance sheet |
When it stops quoting | It does not, though the rate can get very bad | It can pull quotes, and often does in a panic |
What it knows about outside prices | Nothing, until a trade puts it right | Everything, and it prices off that the whole time |
Who carries the inventory risk | Liquidity providers, spread thin over a lot of them | The firm, all in one place |
Behavior differs by venue and by protocol, and availability can change, so treat the rows up there as the general shape and not a fixed description of any one platform.
Cuts both ways, that. A market making firm widens its spreads or pulls out altogether when things turn violent, which protects the firm and strands everybody else. The pool carries on quoting straight through the worst of it, at rates that get steadily more unpleasant, and the traders taking those rates are the reason there is still a market at all once the professionals have gone home. Whether that counts as better liquidity or just liquidity that never says no depends what you needed it for.
Crypto, stocks, commodities, forex, and more
Get StartedLP Tokens, Yield Farming, and Impermanent Loss
Deposit into a pool and you get an LP token back. It is a receipt, nothing more than that. Burn it later on and you get your share of the reserves out, plus whatever fees piled up while you were in there.
Yield farming stacks something else on top. Protocols hand out extra token rewards to depositors, sometimes generously, mostly to pull liquidity into a pool that would not otherwise have any worth speaking of.
Impermanent loss is the one people underestimate. Deposit two tokens, watch one of them move hard in either direction, and the pool quietly rebalances you into more of the loser and less of the winner. Pull out and you are holding less value than if you had kept the two tokens in a wallet and done nothing at all. Fees can cover that gap. They do not always. How these pieces fit together in practice, and who ends up holding what, is set out in this guide to DeFi trading platforms.
Related, and worth knowing the phrase: what is exit liquidity? It describes being the buyer of last resort for somebody else's position. Inside an automated market maker crypto pool that goes uncomfortably literal, because the pool will always buy whatever is being sold, and if a token is getting dumped, the pool and the people who funded it are the ones absorbing it.
Conclusion
One pool, one swap, two numbers that moved. Trader paid 2,200 for ETH quoted at 2,000, and the next person along found it at 2,420. None of that was a fee, a spread, or a decision anybody made. It fell out of a single multiplication the contract is not allowed to break. Get that one line and the rest of it, LP tokens, slippage warnings, bots racing each other to close gaps, all follows on from there.
Same feeds, none of the risk.
Try Demo AccountDisclaimer: Trading involves significant risks of capital loss and may not be suitable for all investors. This article is for informational purposes only, and does not constitute financial advice.
See more:Crypto