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.

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

sminted=(xdepositedydeposited)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.

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:


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.

Redemption: Removing Liquidity

There are two types of redemption:

  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.

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.

Last updated