# Pool Interactions

## Initialization of a Pool

The creation (or initialization) of a pool determines the initial price of the asset pair, and their resulting swap ratio. The initializer receives LP shares for creating the pool. A larger amount of tokens deposited will result in more LP shares for the initializer. Increased liquidity will also lead to less slippage and a more stable pool.&#x20;

Using *x* and *y* for each token, and *s* for the number of LP shares minted, liquidity pools are initialized as follows:

$$
s\_-minted = √(x\_-deposited\*y\_-deposited)
$$

## Minting and Burning LP Shares (from existing pool)

LP Share tokens represent a proportional share of the liquidity pool and the reservoirs. The tokens that flow into the reservoir after rebases can be reintegrated into the liquidity pool, leading to increased liquidity and fees.&#x20;

### Minting: Adding Liquidity

LPs can add liquidity in two ways:

1. Deposit double-asset liquidity
2. Deposit single-asset liquidity that is less than or equal to the value in the opposing reservoir

Let *‘s’* represent the number of shares, and *‘z’* represent the total number of tokens in the pool:

$$
s\_-minted/s\_-starting=z\_-deposited/z\_-starting
$$

LPs will always be able to deposit an equivalent amount of Token X and Y. When one reservoir, i.e. Token X, is partially filled, LPs can mint shares by depositing Token Y to balance the pool.&#x20;

### Redemption: Removing Liquidity

There are two types of redemption:&#x20;

1. LPs can withdraw liquidity and redeem (burn) for a proportional share of the pool and reservoir
2. LPs can withdraw from just a single-asset reservoir, up to the total number of tokens in the reservoir.

Option #1 will always be available to LPs, resulting in an equivalent withdraw of Token X and Token Y. If one reservoir is partially filled, i.e. Token X, LPs can redeem shares for just Token X.&#x20;

One thing LPs should be cognizant of - if you deposit single-asset liquidity, that does not mean you will be able to redeem for a single asset.&#x20;


---

# 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://docs.prl.one/buttonwood/learn/buttonswap/pool-interactions.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.
