Once you understand what is a DEX, the natural next question is: how does it actually set a price and execute a trade? The answer for most modern DEXs is the Automated Market Maker (AMM) model, built around liquidity pools.
{{IMAGE:assets/images/amm-featured.webp}}
What a liquidity pool actually is
A liquidity pool is a smart contract holding reserves of two tokens — for example, ETH and USDC. Liquidity providers deposit both tokens into the pool in a set ratio, and in exchange, they earn a share of the trading fees every time someone swaps against that pool. The pool itself has no opinion about price beyond what its own reserves and pricing algorithm determine — there’s no external order book being referenced.
How the AMM sets the price

The most common AMM design maintains a mathematical relationship between the two reserves (often, though not always, a “constant product” formula where the two reserve amounts multiplied together stay constant). When you swap ETH for USDC, you’re adding ETH to the pool and removing USDC, which shifts the ratio and therefore the price for the next trade. This is why the price you’re quoted moves in real time as trades happen — the pool is continuously repricing itself based on its own current reserves, not waiting for a new matching order.
{{IMAGE:assets/images/amm-mechanism.webp}}
Why large trades move the price more
A small trade against a deep pool (one with large reserves relative to the trade size) barely shifts the ratio, so the price impact is minimal. A large trade against a shallow pool shifts the ratio significantly, which is why the same-sized trade can produce very different slippage depending entirely on how much liquidity is actually sitting in that specific pool. This is a structural property of the AMM model, not a flaw in any particular DEX’s implementation — it’s the same reason DEX vs. CEX liquidity comparisons depend heavily on which specific pair and pool you’re looking at.
What liquidity providers actually earn

Liquidity providers earn a proportional share of the trading fees generated by the pool they’ve contributed to, paid out continuously as trades happen. In exchange for that fee income, they take on a real risk called impermanent loss — if the two tokens’ relative price moves significantly after depositing, a liquidity provider can end up with less value than if they’d simply held the two tokens separately instead of pooling them. Impermanent loss is a genuine, well-documented risk specific to being a liquidity provider, not something that affects someone simply trading against an existing pool.
{{IMAGE:assets/images/amm-lp-earnings.webp}}
Why pool depth varies so much between tokens
A pool’s depth is simply a function of how much liquidity providers have chosen to deposit into it, which tends to track how established and actively traded a token already is. A major, long-established token’s pool on a leading DEX can hold enormous reserves built up over years by many independent liquidity providers. A newly launched token’s pool might be seeded by just its own creator with a modest amount, which is exactly why a small trade on a brand-new token’s pool can produce dramatically more slippage than the same dollar amount traded against an established pair — the mechanism is identical, but the depth backing it is completely different.
