Prosperity Builders

What Is a Liquidity Pool? A Neighborhood Tool Library

See how liquidity pools work, what liquidity providers risk, and why impermanent loss, smart contract flaws and rug pulls make returns uncertain.

A liquidity pool is a shared collection of tokens held by a smart contract so others can trade against it. People who add tokens to the pool may collect trading fees, but they can also lose value, and nothing about it is guaranteed.

Think of a Neighborhood Tool Library

Painted illustration of a neighborhood tool library with shelves of tools and a neighbor borrowing a ladder.

Imagine a community tool library. Neighbors donate ladders, drills and saws, and anyone nearby can borrow what they need. A small fee at the counter helps keep the shelves stocked and the doors open. The more tools on the shelves, the easier it is for the next neighbor to find what they want.

A liquidity pool works in a similar way, and Ethereum's DeFi overview describes liquidity pools as big pools of funds that applications use, for example in lending, where lenders supply funds that borrowers can draw on. In an exchange pool, the shelves hold two or more kinds of tokens instead of tools, and traders swap one for another.

Where the Analogy Breaks

A library lends tools and gets the same tools back. A pool does not. When a trader swaps, the mix on the shelves changes. If a lot of people want one token, the pool ends up holding less of it and more of the other one.

A library also has people who decide whether to turn a request down. A pool's contract follows its code. And a library's fee income is not tied to the changing market price of what is on the shelves, while a pool's contents are.

How a Pool Works

In a pool used for trading, the code uses a formula to price swaps. The Bank for International Settlements describes automated market makers that set prices by a constant product formula: the amounts of the two tokens, multiplied together, stay constant through a trade. When someone buys one token, the pool's supply of that token goes down and its price goes up.

The people who deposit tokens are liquidity providers. They commonly receive a receipt token representing their share of the pool. Traders pay a fee on swaps, and the design usually shares that fee among providers in proportion to their share. The rate and rules differ by pool.

Impermanent Loss, With a Fictional Example

Diagram of a fictional example. A provider deposits 100 Seed and 100 Brick, worth 200 Brick. When Seed rises to 4 Brick the pool holds 50 Seed and 200 Brick, worth 400 Brick, while simply holding would be worth 500 Brick, a gap of 100 or 20 percent. Fees are ignored and the numbers are invented.

Impermanent loss is the gap between what a provider's tokens are worth in the pool and what they would have been worth if simply held. The BIS article says liquidity providers can lose relative to holding their assets outside the pool when prices diverge, and that trading fees may not offset this.

Here is an invented, simplified example using fictional game tokens. It ignores fees and is arithmetic only.

In this example, the pool is worth 100 less, or 20%, than holding. The loss is called impermanent because it shrinks if the price ratio returns to where it started, but it becomes real if the provider withdraws while prices are apart. Fees collected could reduce or exceed the gap, or not, depending on the pool and trading volume. That is unknowable in advance.

Real Risks and Limits

Painted illustration of a tool library with bare shelves and a padlocked door while two puzzled neighbors stand outside.

No guaranteed return. Fees depend on trading activity, which can fall. Any displayed rate is a snapshot of the past or a projection, not a promise.

Smart contract bugs. The Ethereum security guide says deployed code usually cannot be patched, that stolen assets are hard to trace or recover, and that audits are not a complete fix. The BIS article also describes how a flash-loan attack on a pool's token counts led to a reported loss of about $27 million in one 2020 incident.

Rug pulls. A rug pull is when the people behind a token drain the pool and leave. The U.S. Securities and Exchange Commission described one alleged example in a litigation release. It says the SEC alleged that holders of the receipt tokens can withdraw liquidity without warning and sell into the pool, and that founders told investors the liquidity was "locked" while the receipt tokens were not. Those are allegations in a complaint, and the individual agreed to a settlement without admitting or denying them. The lesson is general: a claim of locked liquidity needs to be checked, not trusted.

Control may sit with a few. Admin keys, upgrade rights and governance can let a small group change a pool's rules. The BIS article argues that full decentralisation is often an illusion.

Withdrawal may not be simple. A provider may be able to withdraw only the tokens the pool holds at that moment, which may not be the mix they deposited. If one token has collapsed, the pool may be mostly that token.

Scams use this vocabulary. The Federal Trade Commission says guaranteed profits and low-risk returns are false claims. Be especially careful about anyone who contacts you out of the blue about a pool.

Regulation varies. Treatment of pools, receipt tokens and fee income differs by country and may change. This guide does not describe the rules where you live.

A Hypothetical Prosperity Builders Learning Exercise

This is a proposed exercise for learning only, using fictional game credits with no real-world value. It is not an available feature. Nothing can be earned, withdrawn or converted.

A player runs a simulated tool library in the game city: 100 Seed and 100 Brick on the shelves, with a fictional fee on each swap. The simulator then runs four weeks:

  1. Quiet trading, with very few fees.
  2. Heavy trading, with Seed rising to 4 Brick.
  3. A bug in the pool code locks the shelves.
  4. The pool's founder quietly drains it.

After each week, the player compares the pool share with simply holding the tokens, and writes down what they would have needed to know in advance. The point is to see how the same pool can look very different depending on the week. The numbers are invented.

A Practical Checklist

Questions to Take Into the Next Guide

If a pool's value depends on a price ratio, what happens when one of the two prices changes quickly, and how would you know the quote you were given was fair? The next guides look at how large swaps move prices and why the price you see may differ from the price you get.

Sources and Further Reading

Try the Ownership CalculatorExplore Another Idea