The impact of AMM’s impermanence loss: an article to understand how to participate in liquidity mining

Summary of key points:

1. The concept of DeFi (Decentralized Finance) continues to be popular. The total ecological lock-in funds in DEFI has increased from US$680 million in early 2020 to US$80.41 billion in August 2021, and it has increased by 17,700%.

2. With the explosion of DeFi phenomena, more and more users are investing in the upsurge of liquid mining. The impermanent loss caused by the AMM mechanism is an important consideration in the timing of mining.

3. According to specific calculations, suppose we invest in liquidity mining at the Ethereum price of 2000u. When the price unilaterally rises to 3048U, the liquidity loss will be 2.18% (without considering the handling fee factor); suppose the liquidity mining of Ethereum The annualized profit of mining is 30%. At this time, it will take about 1 month of mining profit to make up for the loss of liquidity;

4. Assuming that the price of Ethereum does not rise unilaterally but fluctuates, when the price approaches the initial price, the impermanence loss will also be greatly reduced;

5. Therefore, assuming that prices are expected to fluctuate violently in the next few days and maintain unilateral increases, you may wish to wait for the price to stabilize slightly before investing your assets in liquid mining.

6. In addition, because market makers under the AMM mechanism will automatically act in the opposite direction to general market traders, the more they rise, the more they sell, and the more they fall, the more they buy. To a certain extent, the AMM mechanism helps retail market makers to achieve fixed investment (or fixed investment). Sell): Users will find that as the price unilaterally rises or falls, the number of assets with rising prices (such as ETH) decreases, while the number of assets with relatively falling prices (such as USDT) continues to increase.

With the explosion of DeFi phenomenon, more and more users are investing in the upsurge of liquid mining. When the author participates in liquidity mining, in addition to considering the annual income of mining, the security of the agreement (smart contract risk, whether the project is open source, whether the code is audited), the impermanent loss caused by the AMM mechanism is also an important consideration. This determines the time to invest in mining.

Liquidity providers under the AMM mechanism have 4 aspects of profit and loss:

1. Gas fee for on-chain transfer

2. Liquidity mining income

3. Price fluctuation gains and losses

4. The impermanence loss caused by the AMM mechanism

This article will focus on the impermanence loss under the AMM mechanism and analyze the timing of liquidity mining investment.

principle:

The core market-making formula of AMM automatic market makers is X*Y=K.

Whenever a liquidity provider deposits an asset, calculate the product of the two asset quantities and keep it constant; the deposit ratio is the price of the asset at a certain moment. Assuming that the current price of ETH is 2000 USDT, the market maker deposits 1 ETH and 2000 USDT, the product is 2000; at this time, the trader can exchange ETH from the liquidity pool at the unit price of 2000 USDT plus the handling fee.

Since the constant K in the formula is constant, the market maker’s trading behavior is determined: the price is determined according to the ratio of the two assets in the pool, and changes dynamically with the transaction; the market maker’s trading behavior in the market and investors On the contrary, it is automatic.

Chestnuts that produce impermanent loss:

Assuming that an asset X in the pool continues to rise, the market maker will automatically act in the opposite direction to the general market trader. The more it rises, the more it sells. Therefore, the number of assets X with rising prices in the pool will decrease, and the assets Y with relatively falling prices The number continues to increase. After a period of time, the market maker will find that the value of the assets held in its hands is lower than the value of the initial assets (assuming that it has not been invested in the liquidity pool). This is the process of impermanent loss.

Give a specific chestnut :

The core market-making formula X*Y=K, here I assume that market makers initially rushed into 1 ETH, 2000 USDT, constant K=2000; as the price of ETH rises, in the current unilateral market, all the way Rising to 3048USDT, the assets held by the market maker at this time change as follows:

Initial assets: 1 ETH, 2000 USDT (equivalent to 1.66 ETH at the current price)

Assets held by the market maker after the price change: 0.81 ETH, 2469 USDT (equivalent to 1.62 ETH at the current price, a decrease of about 0.04)

Since the market maker will automatically act in the opposite direction to the market, the asset ETH whose price rises after the change will decrease, while the USDT will increase. The reduced value (approximately 0.04 ETH) at this time is the liquidity loss, proportionally It was 2.18%.

The dynamic change of the impermanent loss when the price of ETH rises unilaterally

The impact of AMM's impermanence loss: an article to understand how to participate in liquidity mining

It can be seen from the chestnut that if we invest in liquidity mining at the ETH price of 2000u, when the price unilaterally rises to 3048U, the liquidity loss is 2.18% (without considering the handling fee factor). In some DeFi agreements, the annualized profit of ETH liquidity mining can reach 30%. At this time, it will take about 1 month of mining profit to make up for the liquidity loss;

Therefore, assuming that we expect the price to fluctuate sharply in the next few days, we might as well wait for the price to stabilize slightly before putting the asset into liquidity mining.

In addition, assuming that the price of ETH continues to rise unilaterally, the impermanence loss will continue to expand : when the price rises to 4181U, the impermanence loss of liquidity mining will reach 6.43%.

But the good news about impermanence loss is that assuming that the price is not a unilateral increase but a shock, when the price approaches the initial price, impermanence loss will also be greatly reduced : as shown below, when the ETH price rises from 2000U to 3063U, impermanence loss Up to 2.23%; but assuming that the price drops to 2025U thereafter, the impermanence loss will approach zero.

The dynamic change of the impermanent loss when the price of ETH unilaterally rises and falls

The impact of AMM's impermanence loss: an article to understand how to participate in liquidity mining

In addition, we can also conclude from the figure that under the AMM mechanism, market makers will automatically behave in the opposite direction to general market traders. The more they rise, the more they sell, and the more they fall, the more they buy. To a certain extent, the AMM mechanism helps retail market makers. Realized fixed investment (or fixed selling) : Users will find that as the price unilaterally rises or falls, the number of rising assets (such as ETH) decreases, while the number of relatively falling assets (such as USDT) continues to increase.

Finally, I attach a few graphs of the dynamic change of impermanence loss for the price release imagination, readers can take it for themselves; the author can also analyze the dynamic change of impermanence loss for other currencies based on the feedback, so that readers can refer to the timing of investing in liquidity mining. And the cost of retrospective liquid mining.

The impermanent loss when the price of ETH unilaterally rises to 10000U

The impact of AMM's impermanence loss: an article to understand how to participate in liquidity mining

The dynamic change of the impermanent loss when the price of ETH fluctuates and rises

The impact of AMM's impermanence loss: an article to understand how to participate in liquidity mining

 

Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/the-impact-of-amms-impermanence-loss-an-article-to-understand-how-to-participate-in-liquidity-mining/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Leave a Reply