Adding Liquidity in Blue Lotus DAO
There are some conditions when adding liquidity to the Blue Lotus DAO:
- 1.After LP contributions, the token price is unchanged.
- 2.andare also unchanged after LP contributions.
In Blue Lotus DAO, the pool for pair X-Y needs to maintain 4 parameters:
- 1.The initial amount of tokenthat is used for amplification, denoted by
- 2.The initial amount of tokenthat is used for amplification, denoted by
- 3.The change in tokenamount after trading activities, denoted by
- 4.The change in tokenamount after trading activities, denoted by
Therefore, the real balances and virtual balances of the reserves are:
Real Balances
Virtual Balances
where
is the amplification factor. You may find more information about the amplification factor here.
The constant product
.
Note that
and
at this time are:
The current price:
Liquidity Providers have to contribute in the same proportion for all 4 amount types. We denote the contribution ratio to be
. LPs have to contribute
,
in which:
The real balances and virtual balances of the reserve after contribution are:
Real Balances
Virtual Balances
The constant product, after the LP contribution, becomes:
and
at this time are:
The current price is updated to be
We see that after LP contributes, the current price,
and
are unchanged. It is similar in the case of LPs withdrawals, where the ratio
is negative.
- Initially, the first LP put 100and 100to the reserve, we have:.
- A user trades 20 X for 15 Y, so we have the updated parameters:.
- Suppose an LP wants to contribute 20% of the current token amounts in the pool, so he should deposit:
ie. deposit 24X and 17Y tokens.
The parameters are then updated to be:
,
,
,
.
Last modified 1mo ago