STONKBUILDER LEARN· Live learning library · 177 focused guides How we work ↗Follow @stonkbuilder8 ↗
CONNECTFollow @stonkbuilder8TICKER$STONKB
DeFi foundations · 4 MIN READ

What Is a Crypto Liquidity Pool? How DEX Swaps Work

A liquidity pool holds assets under smart-contract rules. A swap changes its reserves; the pool model, available liquidity, fees and trade size shape the result.

◈ Human review: StonkBuilder Editorial · 2026-10-11How we publish ↗
BEFORE YOU BEGIN

This guide is educational, not personalized financial, legal or security advice. A checklist reduces avoidable mistakes; it cannot make a transaction risk-free.

Hand-inked divided tray holding teal rounded pieces and coral squares; one teal piece enters as coral pieces leave, an editorial metaphor for two reserves changing in a swap.
The tray is a metaphor for pooled reserves, not a literal crypto container or a specific protocol. The diagram below carries the fee-free example and its limits.
A fee-free fictional constant-product example: 100 A and 10,000 B become 110 A and about 9,090.91 B after 10 A enters and about 909.09 B leaves; the average output rate changes.
VISUAL EXPLAINER · A SWAP CHANGES POOL RESERVES

This is one simplified pool model with invented amounts and no fees. Real pools can use different rules, fees and liquidity ranges; the example is not a live quote.

WHAT TO NOTICE
  1. Before: the fictional pool has 100 A and 10,000 B, a starting reserve ratio of 100 B per A.
  2. The fee-free constant-product example adds 10 A and returns about 909.09 B.
  3. After: the pool has 110 A and about 9,090.91 B; the example's average output rate is about 90.91 B per A.
  4. The trade itself changes the pool rate (price impact); movement while a transaction waits is slippage.
PAUSE & NOTICE

Which amount is invented, what happens to each reserve, and what assumption lets you calculate the output? Explain how a later market move would be different from price impact.

What is a liquidity pool?

A liquidity pool is a set of digital assets held by a smart contract under a protocol's rules. A pool-based decentralized exchange (DEX) can use those reserves to quote and execute swaps without matching each trade to a specific posted order. Not every DEX uses pools: some use on-chain order books, and an aggregator may route one swap across several sources.

In a pool swap, a trader sends in one asset and receives another from the pool. The pool's pricing rules and available liquidity determine how much can come out. A pool is not a promise of a fixed exchange rate, and a token appearing in a pool is not proof that it is legitimate or safe. For an overview of how pool-based exchanges differ from order books, see what decentralized finance is.

How a pool swap changes reserves

Uniswap is one example of an automated market maker (AMM). Its current developer documentation describes pools with two token reserves and explains that swaps trade against those reserves. In the simplified constant-product model, the reserve amounts are represented as x × y = k. This formula describes one pool design, not every DEX or every AMM. Other models can use different rules or concentrate liquidity within selected price ranges.

Imagine a fictional pool holding 100 units of Token A and 10,000 units of Token B. Before a trade, the reserve ratio is 100 B for each A. If a trader adds 10 A, a fee-free constant-product example leaves about 9,090.91 B in the pool, so about 909.09 B comes out. The trader's average output is about 90.91 B per A—not the starting 100. That difference is price impact: the trade itself changes the pool's relative reserves and rate. These invented numbers illustrate the model; they are not a live quote. Actual output depends on the pool's exact rules, fees and route.

Price impact is not slippage

Price impact is the effect of your trade size on the price as it uses available liquidity. For the same pool and rules, a trade that is large relative to liquidity usually moves the rate more than a smaller one. Slippage is a change between the quote and execution while a transaction is pending—for example, because other trades change the market first. A swap can involve both.

Before confirming a real swap, review the input and estimated output, route, pool or protocol fees, network fee, price impact, and minimum output or other execution limit shown by the wallet or interface. A minimum-output check can reject execution below the value you chose; it does not establish that the route, token or quoted price is good. Fees and protections vary by protocol, pool and interface.

If someone supplies assets to a pool

A liquidity provider (LP) deposits assets according to a pool's rules and may receive a share of fees or other returns under that protocol's terms. This is not a savings account or guaranteed income. The value of a position can differ from simply holding the same assets, and smart-contract, token, liquidity and administrator risks depend on the specific pool. Read impermanent loss explained before comparing a pool position with holding.

A no-money practice check

Use the diagram above to compare the fictional pool before and after a swap. Which reserve changed, how did the average output rate move, and which exact pool assumption made the arithmetic possible? Then explain how price impact differs from a price change that happens while a transaction waits.

For another view of trade-size effects, read liquidity and price impact and slippage versus price impact. You do not need to connect a wallet, approve a contract or deposit assets to learn these mechanics.

A MOMENT TO REFLECT

Check your understanding.

Which statement correctly separates price impact from slippage?

A correct answer records local learning progress, not a qualification or proof of financial readiness.

THE READING BEHIND THIS GUIDE

Sources & context

Original educational content prepared for this project. Sources provide context, not endorsement or a guarantee that every statement remains current. Rules, product interfaces and availability can change.

OPTIONAL TELEGRAM COMPANION

Keep learning in Telegram.

Open this published guide in the learning bot. No account connection or wallet is needed.

Continue in Telegram ↗
KEEP LEARNING TOGETHER

Join the $STONKB community.

Follow project updates, share useful ideas and meet other builders. You do not need to buy $STONKB to join.

Explore the community ↗

Take what you learned.
Leave the pressure behind.

More in DeFi foundations ↗
KEEP EXPLORING

Your next good read

View all guides ↗

What would you like to understand?

Search titles, topics and the full guide text. No queries leave your browser.

Approximate visitors and country are counted locally; VPNs and shared networks can affect the estimate. No analytics vendor receives these events. Privacy details.