AMM meaning
An automated market maker (AMM) is a smart contract that lets people swap one crypto token for another without waiting for a matching trader. Instead of pairing a buyer with a seller, it quotes a price from a formula and pays out of a shared pot of tokens. AMMs are the engine behind most DEX (Decentralized Exchange) platforms.
AMM stands for automated market maker. In traditional finance, a market maker is a firm that keeps quoting prices at which it will buy and sell. An AMM does the same job with code. The code is public, it runs on a blockchain, and it never closes.
The pot of tokens comes from ordinary users, not from a company. They deposit tokens into the pool and, in most designs, earn a share of the trading fees in return. Traders pay those fees every time they swap.
An AMM replaces the order book and the professional market maker with a formula and a pool of user funds. The price moves automatically as people trade.
How AMMs work
Liquidity pools
Every AMM market is built around a Liquidity Pool. A basic pool holds two tokens, for example token A and token B. Liquidity providers deposit both tokens, usually in equal value. Traders then swap one token for the other, and the pool's balances change with each swap.
The constant product formula (x*y=k)
The best-known rule is the constant product formula, x * y = k. Here x is the amount of token A in the pool, y is the amount of token B, and k is a fixed number. Each trade must leave the product of the two balances at k (before fees).
When a trader buys token A, the pool loses some A and gains some B. Token A becomes scarcer in the pool, so its price rises. This kind of formula that links price to the balances in a pool is a form of Bonding Curve.
A simple worked example
Imagine a pool with 100 A and 10,000 B. That makes k = 100 x 10,000 = 1,000,000, and the starting price is 100 B per A. A trader wants to buy 10 A. For simplicity, we ignore fees.
| Step | Token A in pool | Token B in pool | Product (k) |
|---|---|---|---|
| Before the trade | 100 | 10,000 | 1,000,000 |
| After the trader takes 10 A | 90 | 11,111.11 | 1,000,000 |
| Trader paid | – | 1,111.11 B | – |
To keep k at 1,000,000, the pool must hold 1,000,000 / 90 = 11,111.11 B after the trade. So the trader pays 1,111.11 B for 10 A, an average of about 111.11 B per A. That is roughly 11% more than the starting price of 100. The pool's new price is about 123.46 B per A.
The numbers above are a teaching example, not a real pool. Real pools also charge a fee. In Uniswap v2, for instance, the fee is 0.3% of the amount a trader puts in, and it stays in the pool.
Arbitrage keeps the pool price close to the wider market. If the pool price drifts away from prices elsewhere, traders can profit by trading until the gap closes. This is how a pool with no live price feed still ends up near the market price.
AMM vs order-book exchanges
Most centralized exchanges use an Order Book (CLOB). It is a list of buy orders (bids) and sell orders (asks). A trade happens when a bid and an ask match. Prices come from what people are willing to pay and accept.
An AMM works differently. Prices come from the ratio of tokens in the pool, and the trader always deals with the pool contract, not with another person. Anyone can create a new market by funding a pool, which is why AMMs list many new tokens quickly.
| Feature | AMM | Order book |
|---|---|---|
| Price is set by | Formula and pool balances | Matching bids and asks |
| Liquidity comes from | Pooled funds from many users | Orders placed by traders |
| Your counterparty | The pool smart contract | Another trader |
| Large trades | Price moves along the curve | Fills walk through the book |
| Order types | Mostly simple swaps | Limit, stop and more |
| Typical venue | Decentralized exchanges | Centralized exchanges, some DEXs |
Neither model is better in every case. Order books give traders precise control over price, while AMMs are open to anyone and work around the clock. Some newer platforms combine both ideas.
Liquidity providers and fees
Liquidity providers (LPs) are users who deposit tokens into a pool so that others can trade. In return, the protocol usually gives them a receipt for their share of the pool. This receipt is often a token, and in some designs it is a position record. They can use it later to withdraw their share.
Each swap pays a fee, and the fee is added to the pool. LPs own a share of the pool, so their share grows as fees build up. The fee rate depends on the protocol and the pool. Uniswap v3, for example, offers three fee tiers per pair: 0.05%, 0.30% and 1.00%.
- Your earnings depend on trading volume. A pool with little trading earns little in fees.
- Your share is proportional. If you supply 1% of a pool, you own about 1% of its fees.
- Fees are not guaranteed. Volume can fall, and fee income can be smaller than the losses described below.
- Some projects add extra token rewards to attract LPs. This practice is often called Yield Farming (Liquidity Mining).
Extra rewards are usually paid in the project's own token, whose value can change quickly. They can make a pool look more attractive than its underlying trading activity justifies.
Risks: impermanent loss and slippage
Impermanent loss
Impermanent Loss is the difference between holding tokens in a pool and simply holding them in a wallet. It appears when the relative price of the two tokens changes after you deposit. The pool formula sells the token that is rising and buys the one that is falling, so the LP ends up with a different mix.
For a standard constant product pool, if one token doubles in price against the other, the LP position is worth about 5.7% less than just holding, before fees. The gap grows as prices move further apart. It is called impermanent because it shrinks if prices return, but it becomes real when you withdraw.
Slippage and price impact
Slippage is the gap between the price you expected and the price you actually got. In an AMM, large trades relative to the pool move the price along the curve, as the worked example showed. Prices can also change between the moment you submit a trade and the moment it is confirmed. Many apps let you set a slippage tolerance so that a trade fails instead of filling at a much worse price.
Other risks
- Smart contract risk: a bug in the code can lead to lost funds, even in audited projects.
- Fake or malicious tokens: anyone can create a pool, including for tokens designed to trap buyers or LPs.
- Front-running: other traders or bots may see a pending trade and trade ahead of it to profit from the price change.
- Rules and taxes: how authorities treat swaps and LP rewards differs by country and can change.
Providing liquidity or swapping through an AMM can lead to partial or total loss of funds. This page is educational and is not investment, tax or legal advice. Readers in Türkiye and elsewhere should check their local rules and speak to a qualified adviser.
Popular AMM designs
The constant product formula was the starting point, but developers have built other designs to fix its weak spots. Each one changes how the pool spreads its funds across prices.
Constant product
This is the x * y = k design described above, used by Uniswap v2 and many copies of it. It is simple and always has liquidity at every price. The downside is that most of the funds sit at prices where trading rarely happens, so large trades move the price a lot.
Concentrated liquidity
Concentrated liquidity lets LPs choose a price range for their funds instead of spreading them over all prices. Uniswap announced this design in v3 in March 2021 and launched it on Ethereum in May 2021. Funds inside the chosen range work harder, so trades get less price impact. If the price leaves the range, the position stops earning fees, and it can be more exposed to impermanent loss.
Stable-swap
The stable-swap design, used by Curve, is built for assets that should trade near the same price, such as stablecoins. It blends a constant sum formula with a constant product formula. While the pool is balanced, the price stays almost flat, so trades see low slippage. If the pool becomes very unbalanced, it behaves more like constant product.
| Design | Core idea | Best suited to |
|---|---|---|
| Constant product | x * y = k over all prices | General pairs, simple pools |
| Concentrated liquidity | LPs pick a price range | Pairs where LPs manage ranges |
| Stable-swap | Flat curve near the peg | Stablecoins and similar assets |
Newer versions keep adding options. Uniswap v4 went live on January 31, 2025, and lets developers attach custom code, called hooks, to pools. Hooks can change how fees, swaps and LP positions behave.
AMM variants: vAMM and TWAMM
vAMM (virtual AMM)
A virtual AMM, or vAMM, uses the same kind of formula but holds no real tokens in its reserves. The balances are just numbers in a contract that set a price. It is mainly used for perpetual futures, which are leveraged contracts that track a price without owning the asset.
In Perpetual Protocol's original design, traders deposited collateral into a separate vault, and the vAMM curve set the price their positions were valued at. Because a vAMM has no real LPs, gains for one trader are matched by losses for another, and other safeguards such as an insurance fund cover shortfalls.
TWAMM (time-weighted AMM)
A TWAMM, short for time-weighted average market maker, was proposed by Paradigm in July 2021. It is designed for large orders. A trader submits one big order, and the contract executes it gradually over a set number of blocks, in many tiny virtual pieces, against an ordinary constant product pool.
The aim is to reduce the price impact of a large order without the trader sending many separate transactions. Because the trades happen between blocks, they are also designed to be less exposed to sandwich attacks, a form of front-running.
vAMM and TWAMM are variants of the AMM idea. They solve different problems, derivatives pricing in one case and large-order execution in the other, and they are less common than basic swap pools.
Frequently asked questions
What does AMM stand for?
AMM stands for automated market maker. It is a smart contract that sets prices with a formula and trades tokens against a pool of funds that users supply. The word market maker comes from traditional finance, where a firm keeps quoting prices to buy and sell. An AMM does that job automatically, with code and pooled liquidity, instead of with a firm.
How does an AMM set prices?
An AMM sets prices from the balances of the tokens in its pool, using a formula. In the common constant product design, the pool keeps the product of its two balances fixed, so buying one token makes it more expensive. Arbitrage traders then push the pool price back toward the wider market whenever the two drift apart.
Is an AMM the same as a DEX?
No. A DEX, or decentralized exchange, is the broader category of exchanges that run without a central operator. An AMM is one way to build a DEX, using pools and a pricing formula. Some DEXs use order books instead, and some combine both. Most well-known DEXs today are AMM-based, which is why the terms are often mixed up.
How do liquidity providers earn money?
Liquidity providers usually earn a share of the trading fees that the pool collects, in proportion to how much of the pool they supply. Some projects also pay extra reward tokens. Earnings are not guaranteed. Low trading volume, falling reward token prices and impermanent loss can all reduce or wipe out the returns, so the net result can be negative.
Related terms
- Liquidity Pool
- Impermanent Loss
- Slippage
- DEX (Decentralized Exchange)
- Yield Farming (Liquidity Mining)
- Order Book (CLOB)
- Bonding Curve
Sources
- Uniswap v3 announcement Uniswap Labs blog
- Uniswap V4 goes live, with swaps rolling out across the next few days The Block
- TWAMM Paradigm
- Paradigm Team Outline Efficient AMM Design for Large Trades The Defiant
- Curve StableSwap Exchange: Overview Curve Finance docs
- Uniswap v2 price impact RareSkills
- Dissecting the Perpetual Protocol 0xkowloon (Substack)
- Virtual AMM glossary entry CoinAPI
This glossary entry is for general information and education only. It is not investment, tax or legal advice. Crypto assets are high-risk; check official sources before you act.