> For the complete documentation index, see [llms.txt](https://swapmode.gitbook.io/swapmode/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://swapmode.gitbook.io/swapmode/swapmode-1/liquidity-pools.md).

# Liquidity Pools

## What Are Liquidity Pools?

Liquidity Pools are collections of tokens that facilitate decentralized and permissionless trading. Users contribute an equal value of two tokens— a primary and a base token—to these pools. In return for their contribution, they receive Liquidity Provider (LP) tokens, like SwapMode's MLP tokens, representing their share in the pool. For example, depositing SMD and ETH yields SMD-ETH LP tokens, indicating ownership of a part of that pool's assets.

When new liquidity is added, the pool issues new liquidity tokens to the contributor's address, reflecting their share in the pool. The quantity of these tokens depends on their contributed proportion of the pool's total liquidity. For new pools, the initial number of liquidity tokens received is determined by the formula sqrt(x \* y), where x and y represent the amounts of the respective tokens contributed. These liquidity tokens can be redeemed, allowing contributors to withdraw their share of the pool's assets at any time.<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://swapmode.gitbook.io/swapmode/swapmode-1/liquidity-pools.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
