What Is an AMM and How Do DEXs Actually Work?

October 10, 2026
defiautomated market makerdecentralized exchangeliquidity poolscrypto

If you've ever swapped one cryptocurrency for another on a platform like Uniswap or Curve, you've used an automated market maker — probably without thinking much about what was happening under the hood. AMMs are one of the most important innovations in decentralized finance, and understanding them helps explain why decentralized exchanges work the way they do.

**The problem AMMs were built to solve**

Traditional financial exchanges — stock markets, centralized crypto exchanges — rely on an order book. Buyers post bids, sellers post asks, and a trade happens when those two sides agree on a price. It's efficient, but it depends on having enough active participants on both sides of every trade at all times. On a decentralized blockchain, where every action costs a transaction fee and takes time to confirm, running a live order book becomes clunky and expensive.

AMMs sidestep this entirely. Instead of matching a buyer with a seller, they let users trade against a pool of funds locked in a smart contract. No counterparty needed.

**What a liquidity pool actually is**

A liquidity pool is simply a smart contract holding two (or sometimes more) tokens in reserve. Say a pool holds Ethereum and USD Coin. Anyone wanting to swap ETH for USDC trades directly against that pool — sending ETH in and receiving USDC out, or vice versa.

The pool is funded by liquidity providers (LPs): regular users who deposit tokens into the contract. In return, they earn a share of the trading fees generated every time someone swaps through that pool. This creates an incentive for people to keep pools funded and functional.

**The constant product formula**

The most widely used AMM model is built around a simple mathematical rule, sometimes called the constant product formula: x × y = k.

Here, x and y represent the quantities of the two tokens in the pool, and k is a constant that must stay the same after every trade. If you take some of token Y out of the pool, you must put enough of token X in to keep the product equal to k.

The practical effect is that price adjusts automatically based on supply and demand within the pool. As a token becomes scarcer in the pool, it becomes more expensive to buy. This means the AMM is always quoting a price — you never have to wait for a seller to show up.

**Slippage and large trades**

One natural consequence of this model is slippage. On a large trade, you're moving the ratio of tokens in the pool significantly, which shifts the price against you as your order executes. The thinner the pool (less total liquidity), the worse this effect becomes.

This is why pool size matters. A pool with tens of millions of dollars in it will give a much better effective price for a $50,000 swap than a pool with only $200,000. Protocols and traders both pay close attention to "liquidity depth" for this reason.

**Impermanent loss — the LP's trade-off**

Liquidity providers earn fees, but they take on a specific risk called impermanent loss. It happens when the price of the tokens in a pool diverges significantly from when the LP deposited them.

Here's the intuition: because the AMM constantly rebalances the pool's ratio as prices move, LPs end up holding more of the token that fell in price and less of the one that rose. If they'd simply held the tokens in their wallet instead of depositing them, they'd often be better off. The "loss" is called impermanent because it can reverse if prices return to their original ratio — but in practice, it often doesn't.

**Beyond the basic model**

The original constant product formula has spawned a range of variations. Curve Finance (whose native token is CRV) was designed specifically for swapping assets that should trade near the same value — like different stablecoins or wrapped versions of the same asset. Its formula keeps prices stable close to a 1:1 ratio, reducing slippage for those particular trades dramatically.

Protocols like Uniswap v3 introduced "concentrated liquidity," where LPs can choose to provide liquidity only within a specific price range rather than across all possible prices. This makes capital more efficient but requires more active management from the LP.

**How a DEX swap actually flows**

When you use a decentralized exchange built on an AMM, the steps are roughly:

1. You connect a self-custody wallet and specify what you want to swap and how much. 2. The interface queries the relevant pool's smart contract to show you the expected output and any price impact. 3. You approve the transaction, which goes on-chain. The smart contract receives your input token, calculates the output according to the formula, and sends you the result — all in one transaction. 4. A small fee (often 0.05% to 1%, depending on the pool) stays in the pool, accruing to liquidity providers.

No account required. No company holding your funds. No order book waiting to be filled.

**Why it matters**

AMMs made it possible to trade crypto tokens permissionlessly, without relying on a central company to manage matching and custody. Anyone can list a token, anyone can provide liquidity, and the rules are enforced by code rather than policy. That openness comes with real trade-offs — thinner pools, impermanent loss, smart contract risk — but it also represents a genuinely different architecture for how markets can function.

Understanding AMMs is foundational to understanding most of what happens in decentralized finance 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