# Liquidity Providers

Liquidity providers supply liquidity to a pool for traders to swap against. In return for supplying liquidity, LPs receive swap fees from trades. The liquidity that is provided to a pool is represented by liquidity tokens. These tokens represent a proportional share of the liquidity pool and reservoir(s). The liquidity in a reservoir does not earn fees but can be reintegrated into the liquidity pool by LPs. This reintegration or balancing of a pool is done by adding single-sided liquidity. The protocol places constraints on this process to protect LPs further.

## Adding Liquidity

LPs can add liquidity to an existing pool in two different ways:

1. **Double-Sided:** Depositing liquidity for both assets of the token pair at a proportional rate.
2. **Single-Sided:** Depositing liquidity for the asset with less liquidity, further balancing out the pool.

Let *<mark style="color:blue;">`‘s’`</mark>* represent the number of liquidity tokens, and *<mark style="color:blue;">`‘z’`</mark>* represent the total number of tokens in the pool:

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

{% hint style="info" %}
LPs will always be able to deposit an equivalent amount of <mark style="color:blue;">`Token X`</mark> and <mark style="color:blue;">`Y`</mark>. When one reservoir, i.e. <mark style="color:blue;">`Token X`</mark>, is partially filled, LPs can mint liquidity tokens by depositing <mark style="color:blue;">`Token Y`</mark> to balance the pool. &#x20;
{% endhint %}

## Removing Liquidity

There are two types of redemption:&#x20;

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

{% hint style="info" %}
Option #1 will always be available to LPs, resulting in an equivalent withdrawal of <mark style="color:blue;">`Token X`</mark> and <mark style="color:blue;">`Token Y`</mark>. If one reservoir is partially filled, i.e. <mark style="color:blue;">`Token X`</mark>, LPs can redeem liquidity tokens for just <mark style="color:blue;">`Token X`</mark>.&#x20;
{% endhint %}

{% hint style="warning" %}
If you deposit single-asset liquidity, this does not mean you can redeem for a single asset.
{% endhint %}

## Initialization of a Pool

The creation of a pool determines the initial price of an asset pair and its resulting swap ratio. The initializer receives liquidity tokens for creating the pool. A larger amount of liquidity deposited will result in more liquidity tokens for the initializer. Increased liquidity will also lead to less slippage and a more stable pool.


---

# 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.poolside.party/guide/liquidity-providers.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.
