# Liquidity pools

## What is a Pool?

A liquidity pool is like a digital vault containing two different cryptocurrencies that enables automatic trading between them. Think of it as a shared piggy bank where:

* **Depositors (Liquidity Providers)** put in both types of tokens
* **Traders** can instantly swap one token for another
* **Smart contracts** automatically handle the exchange using mathematical formulas

**Simple Example:** An APT/USDC pool contains:

* 1,000 ETH tokens
* 5,000 USDC tokens
* When you want to trade APT for USDC, you add APT to the pool and take USDC out
* The smart contract automatically calculates the exchange rate

**Why Pools Matter:**

* **No order books needed** - trades happen instantly against the pool
* **24/7 availability** - always liquid, no waiting for matching orders
* **Permissionless** - anyone can create or trade in pools
* **Decentralized** - no central authority controls the trading

## Pool Composition and Mechanics

**Two-Token Requirement:** Every pool contains exactly two different tokens in specific ratios:

* The ratio determines the relative price between tokens
* As trading happens, ratios change and so do prices
* More demand for one token increases its price automatically

**Liquidity Provider Shares:** When you add liquidity to a pool:

* You must deposit both tokens in the current ratio
* You receive "LP tokens" representing your share of the pool
* Your percentage ownership determines your share of trading fees
* You can withdraw your share plus accumulated fees anytime


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tapp-exchange.gitbook.io/tapp-exchange/user-guides/earn/liquidity-pools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
