# Liquidity Pool

![Liquidity Pool Brand Asset (2021).](https://1541925851-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZJcN2dcMJyx8PQAqPU%2F-MdljVYUzm8VX0vMd2QK%2F-MdlkIrZI1tDTdZ42xpl%2Fliquiditygitbook.jpg?alt=media\&token=e82cd9a9-960e-46c4-916d-31f08ae6773d)

**Liquidity Pool** is a collection of funds that were locked in Smart Contract. Liquidity pools are used to facilitate decentralized trading, lending, and many more functions in decentralize finance.

{% hint style="success" %}
**Liquidity pool** and **Dark Pool** are two different things. Dark Pool is a private forum in finance industry where user discuss about derivatives, securities, and other financial instrument. Liquidity on these market called the Dark Pool. On the hand, Liquidity in smart contracts were called Liquidity Pool that everyone can view and trace transparently.\
\
[*https://www.boltrswap.com/docs*](https://boltrswap.gitbook.io/boltr/boltr-ecosystem/liquidity-pool)
{% endhint %}

## Liquidity Pool v. Order Books

Liquidity in the traditional market need a maker and taker to create order in the order book which will be place in the **bid** and **ask** column. The thickness of order in the ordering books will determine the liquidity of the asset in that market. Refer **Diagram 1** below:

![Diagram 1](https://1541925851-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZJcN2dcMJyx8PQAqPU%2F-Mdps6Mkj0WIqIbrtng0%2F-Mdptg-YPOMnOG-FislH%2Forderbook.jpg?alt=media\&token=a9f01871-c169-40f2-b1fd-72a0294e6d23)

In liquidity pool, user have to put a liquidity of two different KRC-20 token in order to create/add liquidity to the pair of the token. Compare to the order book mechanism, liquidity pool mechanism requires a Liquidity Provider to add a liquidity of pair of token and in returns, the  Liquidity Provider will receive income from fees generated on the swap made by user who swapped their token in the pool. The mathematical equation of the mechanism is as follows.

$$
x+y = K
$$

*x* is the token A quantit&#x79;*,* while *y* is the token B quantity that makes equal to *constant.* The flow of the ecosystem is like in the **Diagram 2** below:

![Diagram 2](https://1541925851-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MZJcN2dcMJyx8PQAqPU%2F-MdpHi-vYC-jO7MJYyT2%2F-MdpPDf4wn2ZH3tnoN0g%2Fliquidity%20pool.jpg?alt=media\&token=e152ac82-85fc-4b8d-a60f-b64ee1958610)

Whenever liquidity were deposited into a pool, unique tokens known as **Liquidity Pool Token (LP Token)** are minted and sent to the provider’s address. These tokens represent a given liquidity provider’s contribution to a pool. The proportion of the pool’s liquidity provided determines the number of liquidity tokens the provider receives. If the provider is minting a new pool, the number of liquidity tokens they will receive will equal sqrt(x \* y), where x and y represent the amount of each token provided. Just imagine that the LP token is the receipt token that proven your contribution in the pool. For example, when you provide a funds into any physical project, they will give you a letter of grant ownership in order to proof that you are one of the shareholders. LP Token is exact the same with that protocol.

**Passive Revenue** will be earn by the liquidity providers from fees that were executed during the swapping transaction made by user in the Liquidity Pool inside Boltr.


---

# 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://boltrswap.gitbook.io/boltr/boltr-ecosystem/liquidity-pool.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.
