What Is an Automated Market Maker — and How Do DEXs Use It?

December 1, 2026
defiammdecentralized exchangeliquiditycrypto

If you have ever swapped one cryptocurrency for another on a decentralized exchange, you have used an automated market maker — probably without thinking much about what was happening underneath. AMMs are one of the most consequential inventions in decentralized finance, replacing a centuries-old trading mechanism with a simple mathematical formula. Understanding how they work helps explain both the appeal and the real risks of DeFi trading.

**The Problem AMMs Were Built to Solve**

Traditional exchanges — whether stock markets or centralized crypto platforms — rely on an order book. Buyers post bids, sellers post asks, and a matching engine pairs them up. This works well when there is enough trading activity to keep the book populated, but it breaks down for less popular assets where buyers and sellers rarely show up at the same time.

Decentralized exchanges face this problem acutely. Running an order book on a blockchain is slow and expensive; every update requires a transaction. And in the early days of DeFi, there simply were not enough participants to maintain liquid order books for the thousands of token pairs people wanted to trade.

Automated market makers sidestep the order book entirely. Instead of matching individual buyers and sellers, an AMM holds reserves of two (or more) assets in a smart contract — called a liquidity pool — and uses a formula to set the price automatically based on the ratio between them.

**The Constant Product Formula**

The most widely used AMM model, popularized by Uniswap, is built on a deceptively simple equation: x × y = k.

Here, x and y represent the quantities of two tokens in a pool, and k is a constant. When a trader buys some of token Y by depositing token X, the pool's balance of Y decreases and its balance of X increases. To keep k constant, the price of Y relative to X rises. The more Y a trader tries to extract in a single transaction, the worse the exchange rate becomes. This is called price impact or slippage, and it is a direct consequence of the math.

This design means the pool is always willing to trade — there is no need for a counterparty to show up. The smart contract itself is always the counterparty.

**Who Provides the Liquidity?**

Liquidity pools do not fill themselves. They depend on liquidity providers (LPs), ordinary users who deposit equal values of both tokens into the pool. In return, LPs receive a share of the trading fees generated every time someone swaps through that pool. When an LP wants to exit, they redeem their pool share for the underlying tokens.

This sounds straightforward, but there is a well-documented risk called impermanent loss. Because the pool must always rebalance to maintain its formula, an LP's holdings can end up worth less than if they had simply held the tokens outright — particularly when prices move sharply in one direction. The word "impermanent" is used because the loss only locks in when the LP withdraws; if prices return to their original ratio, the loss disappears. In practice, large price swings can make impermanent loss very real.

**Beyond the Basic Model**

The constant product formula is not the only approach. Curve Finance (whose native token is CRV) introduced a hybrid formula specifically designed for stablecoins and assets meant to trade near a 1:1 ratio. Its "stableswap" curve allows much larger trades with far less slippage than a standard constant-product pool, making it efficient for swapping between stablecoins like USDC and USDT.

Balancer extended the concept further, allowing pools with more than two tokens and unequal weightings — so a pool might hold 80% of one asset and 20% of another. This creates something resembling a self-rebalancing index fund managed entirely by smart contract logic.

Concentrated liquidity, introduced by Uniswap v3, let liquidity providers specify a price range within which their capital is active. Outside that range, their funds sit idle. This allows sophisticated LPs to concentrate capital where most trading actually happens, improving capital efficiency — but it also requires much more active management.

**How a DEX Actually Uses an AMM**

A decentralized exchange like Uniswap, SushiSwap, or PancakeSwap is essentially a front-end interface built on top of a collection of AMM pools. When you connect a wallet and request a swap, the DEX's router contract finds the best path through available pools, executes the trades on-chain, and returns the output token to your wallet — all without a central operator holding your funds at any point.

Because the pools are smart contracts on a public blockchain (most commonly Ethereum or Solana), anyone can inspect them, anyone can provide liquidity, and anyone can build a new front end on top of the same underlying contracts.

**What AMMs Changed**

Before AMMs, listing a new token on an exchange required negotiation, compliance checks, and market makers willing to quote prices. With an AMM, any two tokens can have a live trading market the moment someone seeds a pool with liquidity. This permissionless quality accelerated the explosion of new tokens, protocols, and DeFi products that defined the early 2020s.

The tradeoffs are real: smart contract bugs, impermanent loss, and price manipulation in thin pools are genuine risks. But the core insight — that a mathematical formula and a pool of capital can replace a human market maker — proved durable. AMMs remain the foundational mechanism of decentralized trading today.

This article is informational and was produced with AI assistance and reviewed before publishing. It is not financial or investment advice. Crypto is volatile; always do your own research and verify with primary sources.

← More from Orask News