An automated market maker, usually shortened to AMM, is a system that lets people trade digital assets without needing another person on the other side of the trade at that moment. Instead of matching a buyer with a seller, an AMM uses a pool of tokens held by a smart contract and a mathematical formula to decide the exchange rate. AMMs are a core building block of decentralized exchanges.
To see why this is different, consider the traditional approach. Most conventional exchanges use an order book, which is a list of buy orders and sell orders at different prices. A trade happens when a buyer and a seller agree on a price. This works well when many participants are active, but it depends on someone always being willing to take the other side. An AMM replaces that list with a shared pool of funds that is always available to trade against.
The pool is called a liquidity pool. A typical pool holds two tokens, which we can call token A and token B. People known as liquidity providers deposit both tokens into the pool, usually in balanced amounts. In return, they commonly receive a receipt token that represents their share of the pool. When they want to leave, they hand back that receipt and withdraw their portion of whatever the pool holds at that time.
The pricing formula is what makes the system work. One of the best-known versions is called the constant product formula. It says that the amount of token A in the pool multiplied by the amount of token B must stay the same after every trade, apart from fees. Because the product is held constant, the pool adjusts the price automatically as its balances change.
Here is a simple illustration with made-up numbers. Imagine a pool with 1,000 of token A and 1,000 of token B. Multiplied together, that is 1,000,000. A trader wants to buy token B by depositing 100 of token A. The pool now holds 1,100 of token A, so to keep the product at 1,000,000, it must hold about 909 of token B. That means the trader receives roughly 91 of token B. Notice that the trader paid 100 of token A but got a little less than 100 of token B back. The pool now has less of token B and more of token A, so token B has become relatively more expensive in that pool.
This effect is called slippage. It is the difference between the rate you expected before the trade and the rate you actually got. Slippage grows when a trade is large compared to the size of the pool. A deep pool with plenty of tokens barely moves when a trade goes through, while a shallow pool shifts a lot. That is why many trading interfaces let users set a maximum slippage they will tolerate, so a trade fails rather than executing at a much worse rate.
You might wonder how an AMM pool knows what the wider market price is, since it only follows its own formula. The answer is arbitrage. If a pool's price drifts away from prices on other markets, traders can profit by buying the cheaper asset in one place and selling it for more in another. Their trades move the pool's balances, and the pool's price slides back toward the broader market. In this way, the pool does not need to look anything up. Traders correct it.
Liquidity providers are usually compensated through trading fees. Each trade carries a small fee that is added to the pool, so the pool gradually grows relative to the receipts that represent shares of it. The size of the fee depends on how the pool is designed. Earnings are not fixed, since they depend on how much trading actually happens.
Providing liquidity also carries risks worth understanding. The most discussed is impermanent loss. Because the formula rebalances the pool as prices move, a provider can end up with a different mix of tokens than they deposited. If the relative price of the two tokens has changed, the value of what they can withdraw may be lower than if they had simply held the original tokens. The loss is called impermanent because it can shrink if prices return to where they started, but it becomes real once the provider withdraws. Other risks include bugs in the smart contract code, tokens that have very little trading activity, and pools whose tokens lose value.
Not every AMM uses the constant product formula. Some use formulas designed for assets that are meant to trade at similar values, which reduces slippage for those pairs. Others let providers concentrate their funds within a chosen price range. Different designs make different trade-offs between simplicity, capital efficiency, and risk.
In short, an AMM replaces the matching of buyers and sellers with a pool of funds and a formula. Liquidity providers supply the tokens, traders swap against the pool, and arbitrage keeps prices roughly in line with the wider market. Understanding slippage, fees, and impermanent loss gives you a clearer picture of what is happening whenever a swap is made.
This article is for general education only — not financial advice, and nothing here is a recommendation to buy, sell, or hold any asset. Cryptocurrency carries real risk of loss; always do your own research before making a financial decision.