šŸ’°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 ā€˜sā€™ represent the number of liquidity tokens, and ā€˜zā€™ represent the total number of tokens in the pool:

sāˆ’minted/sāˆ’starting=zāˆ’deposited/zāˆ’startings_-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 liquidity tokens by depositing Token Y to balance the pool.

Removing Liquidity

There are two types of redemption:

  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.

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

If you deposit single-asset liquidity, this does not mean you can redeem for a single asset.

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.

Last updated