How to calculate the impermanent loss of 80/20 liquidy pools on balancer

x3finance
2 min readMay 22, 2022

--

In the last article, we deduced the curve equation of 80 / 20 pool, and the impermanent loss of 80 / 20 pool is also an important issue of concern for liquidity farmers. Now, we follow the previous idea to make a detailed analysis of the impermanent loss of 80 / 20 pool. For the convenience of future calculation, we make a general derivation of the impermanent loss under different ratio of the two tokens for CPMM(Constant Product Market Maker). Firstly, we assume that the amount of eth(tokenA) is x, the amount of usdt(tokenB) is y, and the value ratio of eth in the pool is r, then:

y=k(x)^(r/(r-1)) — — — — — — — — (1)

According to the value ratio relationship between Eth and usdt:

yr=(1-r)px — — — — — — — — — — — (2)

After deriving from (1), we get:

Exchange rate P = — y ‘= k (r / (1-r)) (x) ^ (1 / (r-1)) — — — — — (3)

simultaneous equations (1), (2), (3) we can get (4) and (5)

Then according to (1), (2), (3), (4) and (5)

The total value calculated by eth is Vfx for farming, the total value calculated by usdt is Vfy for farming, and the total value calculated by eth is Vhx for just holding, then the impermanent loss IL = Vfx / Vhx — 1 can be calculated according to (1), (2), (3), (4) and (5)

--

--

x3finance
x3finance

Written by x3finance

Free High Profit Excel AI Crypto Trading Bot including Okx and Binance

Responses (1)