Risk Warning: Beware of illegal fundraising in the name of 'virtual currency' and 'blockchain'. — Five departments including the Banking and Insurance Regulatory Commission
Information
Discover
Search
Login
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt
BTC
ETH
HTX
SOL
BNB
View Market
A brief analysis of impermanent loss (Impermanent Loss) |
newsletter
特邀专栏作者
2021-01-12 16:35
This article is about 1974 words, reading the full article takes about 3 minutes
A brief analysis of Impermanent Loss can let everyone understand the dangers and opportunities of liquidity providers, and help everyone get closer to DeFi (decentralized finance) and understand DEX (decentralized exchange).

l Definition of impermanent loss

Impermanent loss, English is Impermanent Loss, that is, the asset difference between the assets in the liquidity pool and the assets outside the pool due to changes in currency prices. The impermanent loss is aimed at the provider who injects assets into the liquidity pool of DEX, which is called liquidity provider (Liquidity Provider, LP for short). Assets are injected into the liquidity pool, and the opportunity cost of assets in the above two different directions.

l Examples of impermanent loss

In order to better explain what impermanence loss is, first we assume the following three premises:

First, assume the following liquidity pool. Here is a continuation of the AMM example in the previous knowledge class. There are 1000FC and 250USDT in the liquidity pool.

The FC and USDT liquidity pools are shown in the figure below. According to the characteristics of the classic liquidity pool, the product of the number of FC and the number of USDT is a constant, and the formula is X*Y=K (constant). Initially, the price of FC and USDT in the pool is 1:1. If the current price of FC is $0.25 and USDT is a stable currency of $1, assuming that the number of FC in the pool is 1000, then the amount of USDT is (0.25* 1000)/1=250 pieces. According to X*Y=K, the available constant K is 1000*250=250000.

Second, assuming that there are 100FC and 25USDT provided by me in the liquidity pool, I have 10% of the assets in the liquidity pool;

Third, FC keeps rising until at a certain point, the number of FC in the liquidity pool decreases to 500, and the number of USDT increases to 500.

Question 1: Based on the assumptions, what is my current asset status?

Answer: Because my share of the liquidity pool is 10%, my current assets in the liquidity pool are 50FC and 50USDT;

Question 2: What is the status of my assets if I am not involved in providing liquidity?

Answer: If no liquidity is provided, my assets are 100FC and 25USDT

Question 3: How much is my impermanence loss at this moment?

Answer: The impermanent loss this time is 25 US dollars, and the asset loss is 20% (excluding income such as handling fees). The calculation process is as follows:

1. When liquidity is not provided:

My assets are 100FC and 25USDT, that is, 100*FC current price + 25*USDT price=100*1+25*1=125

2. When liquidity is provided:

My assets are 50FC and 50USDT, that is, 50*FC current price + 50*USDT price=50*1+50*1=100

3. The difference between the asset price when no liquidity is provided and the asset price when liquidity is provided:

125-100=25. The loss ratio is 25/125=20%.

Question 4: Why does impermanence loss occur?

Answer: Because the price of FC keeps rising, and FC in the original liquidity pool will be relatively cheaper, so some people will continue to charge USDT in the liquidity pool and swap out FC for arbitrage, the FC in the pool will decrease, and USDT will will increase. For me as a liquidity provider, it means that the FC in my hand is constantly being sold at a relatively low price, and the income is USDT that is depreciating relative to FC, which also produces impermanent losses. The impermanent loss is translated from English Impermanent Loss. In fact, the English literal translation is temporary loss. That is to say, when I initially deposit FC and USDT, the value ratio between FC and USDT changes due to changes in currency prices. Generated Impermanent Loss. But after a period of time, when the price ratio of FC and USDT returns to the ratio of my initial deposit, this loss will disappear. So it is called temporary loss.

Question 5: What does the function curve of impermanence loss look like?

First of all, through calculation, we can list the time points of the FC and USDT quantities of several liquidity pools, and obtain the corresponding loss ratio according to the impermanent loss calculation method mentioned in question 3. As shown in the chart below:

According to this table, we can draw the following line chart with the number of FCs on the horizontal axis and the loss ratio on the vertical axis.

The point where the broken line intersects the horizontal axis in the above figure is the state when the USDT in the initial liquidity pool in the above table is 25 and FC is 100, and the loss ratio is 0 at this time. This also means that if other income is not considered, the assets of the liquidity provider LP will not grow over time, but will remain flat at most.

Question 6: Why is the parabola in the line chart in Question 5 not symmetrical?

Answer: According to the chart in question 5, we can know that for the change of FC, the loss ratio actually changes evenly. The reason why the broken line graph in Question 5 is not a symmetrical graph is that the value range of the horizontal axis is 0-2000. If the value range of the horizontal axis of the broken line graph in Question 5 is expanded to 0 to infinity, and the number of FCs is 100 as the central axis to draw the graph , the obtained graph is roughly as follows:

Question 7: Where is the profit range?

Answer: The graph drawn in the above questions does not take into account the income of liquidity providers. Here it is mainly the fee income, and the fee income is related to the transaction frequency and transaction volume of the trading pairs in the DEX. If we take the handling fee into account, the graph looks like this:


As shown in the figure above, only the interval above the horizontal axis of the coordinate axis and within the parabola is the interval in which the liquidity provider LP can make a profit.

Question 8: The loss of impermanence is so severe, so why do people still want to be liquidity providers?

Answer: There are generally three main situations as follows:

1. As in question 7, there is a profit range to make a profit;

2. Some trading pairs with relatively stable currency prices are likely to return to the original ratio within a long enough period of time. At this time, there will be no impermanent loss when withdrawing;

3. Participate in liquidity mining. When the income of mining years is high, the possibility of profit is relatively high.

Today's FLUX class - Impermanent Loss (Impermanent Loss), can let everyone understand the dangers and opportunities of liquidity providers, and help everyone get closer to DeFi (decentralized finance) and understand DEX (decentralized exchange).

烤仔星选计划
Welcome to Join Odaily Official Community