Providing Liquidity: a practical example

Adding liquidity

Imagine Alice has 100 LYX and she wants to become a liquidity provider for the LEEQUID protocol. The current ratio in the pool is 1 LYX : 0.9827 sLYX. Because the ratio needs to be maintained when adding liquidity, Alice cannot simply add her 100 LYX. She would have to add exactly 98.27 sLYX tokens for each 100 LYX she adds. But Alice only has 100 LYX, so the steps she follows are:

  1. She goes to the LEEQUID platform and realizes that, in order to provide 50 LYX of liquidity, she needs to balance it by providing 49.135 sLYX tokens to the pool as well.

  2. Since Alice doesn't have any sLYX yet, she stakes 49.135 LYX through the staking pool and gets 49.135 sLYX back (she could also have simply swapped the LYX via the liquidity pool).

  3. Alice returns to the liquidity Swap tab of the LEEQUID platform and provides 50 LYX and 49.135 sLYX as liquidity to the pool.

  4. Alice gets the liquidity pool tokens (LP tokens), corresponding to the share of the pool she now owns.

Alice doesn't need to do anything else. Rewards corresponding to the 49.135 sLYX she deposited in the pool will continue to accrue to her address, even if she doesn't see her reward balance update, as her tokens are in the possession of the pool. The rewards can later be claimed once she exits her position as a liquidity provider. Furthermore, Alice will be accruing liquidity provider fees as well, which apply to every trade in the liquidity pool.

Removing liquidity

Alice now wants to redeem her LP tokens for LYX and sLYX. The amount of LYX and sLYX she will get back depends on the current ratio of the pool, plus the amount she earned in fees from the liquidity pool.

  1. Alice goes to the Swap tab of the LEEQUID platform and connects her wallet, selecting the same address she used to add liquidity. This is the address that contains the LP tokens representing ownership of her share of the pool.

  2. She chooses to cash out the Max value possible, which will return 56.1564 LYX and 54.8367 sLYX, at a ratio of 1 LYX : 0.9765 sLYX. This means that Alice made a profit of 6.1564 LYX and 5.7017 sLYX in liquidity provider fees.

  3. Now Alice goes to the Rewards tab in order to claim the rewards she earned while being a liquidity provider.

It's now up to Alice to hold both the LYX and sLYX tokens, swap the sLYX back to LYX, or convert everything to sLYX.

Last updated