Understanding Impermanent Loss

Understanding Impermanent Loss

The greater the price change or volatility of the assets, the larger the impermanent loss.

Intermediate
04 Jun, 2021
12 mins

What is impermanent loss?

Impermanent loss is a unique phenomenon to Decentralized Finance (DeFi) Automated Market Makers (AMM), in which liquidity providers suffer a temporary loss of funds due to the change in the value of the deposited assets from their initial value when deposited. The greater the price change or volatility of the assets, the larger the impermanent loss.

In other words, an impermanent loss is also a measure of how much a liquidity provider has lost if they had simply held on to their assets. Moreover, an impermanent loss is referred to as temporary because it can be eliminated if the value (measured in dollar value) of the asset reverts to what it was when deposited. Alternatively, if a liquidity provider removes their liquidity before the value reverts, then they make the loss permanent.

How does Impermanent loss work?

The example below will help to explain how impermanent loss works

Example

To understand impermanent loss, it is important to understand the basic mechanisms of how liquidity pools operate with AMM rather than order books.  The example will be explained from the perspective of just the liquidity provider without considering the liquidity pool and other liquidity providers for simplicity. With this in mind, an impermanent loss can be explained as follows. 

Automated Market Marker (AMM)

An AMM works the Constant Product AMM formula, which is represented as

Automated Market Marker (AMM)

A liquidity pool usually requires two assets to be deposited in equal ratios in terms of their dollar value. So, for example, one can have a stablecoin such as USDC and a cryptocurrency like ETH.

  • The ratio is 50:50

  • Therefore if 1 USDC= $1and 1 ETH= $100;

  • And let’s say Hassan (the liquidity provider) has 10,000 USDC. He would then need to provide 100 ETH ($10,000)

  • The total amount he provides is $20,000

  • Ratio: 100 ETH: 10,000 USDC

  • In applying the AMM formula of X * Y = K, we find that

  • X = 100

  • Y= 10,000

  • Therefore K= 100 * 10,000, which equates to 1,000,000

  • Thus, however much the ETH or USDC changes in price, the product must always equate to the constant (K), which is 1,000,000

As a stablecoin, the price of USDC will effectively remain at $1, but the price of ETH is more likely to change (either up or down)

  • The price of ETH then doubles to $200; Thus, 1 ETH = 200 USDC outside that specific liquidity pool

  • This creates an arbitrage opportunity in which Arbitrageurs take advantage of and trade the ETH within that liquidity pool until it reaches the value of $200 or 200 USDC, as it is with other liquidity pools and exchanges.

  • Now that 1 ETH = 200 USDC and we must calculate how much liquidity of ETH and USDC is left within the pool

The formula for calculating liquidity is given as

formula
  • Therefore, ETH liquidity will be

  • Furthermore, Token liquidity will be

  • We find that the new ratio is 70.71 ETH: 14,142.13

  • To confirm this, we apply the AMM formula X * Y = K

  • X= 70.710678

  • Y= 14,142.135623

  • K= 1,000,000  

These new values are the remainder of the initially deposited assets after the ETH price change and can be used to calculate the impermanent loss in the following manner.

Old ratio: 100 ETH: 10,000 USDC

New ratio: 70.710678 ETH: 14,142.135623 USDC

If Hassan opts to remove their assets from the liquidity pool now, the total dollar value of their assets will be

  • 1 ETH is now $200, therefore 70.710678 x 200 = $14,142.1356

  • $14,142.1356 + 14,142.135623 USDC = $28,284.2712

  • Hassan had initially deposited a total dollar value of $20,000. At first glance, it may seem like Hassan made a profit, although this is not the case.

  • Given the old ratio when Hassan had 100 ETH, with the current price of $200 for 1 ETH, Hassan would have (100 ETH x 200) + 10,000 USDC= $30,000

  • Hence, the impermanent loss can be calculated as $30,000 - 28,284.2712= $1,715.7288

  • Essentially, this means that Hassan would have been better off not investing in the liquidity pool since he suffered an impermanent loss of $1,715.7288 after the price of ETH increased.

It is important to note that the greater the divergence of asset price from its initial deposited price, the greater the impermanent loss. Moreover, the loss only becomes permanent if the assets are withdrawn before the price reverts to its initial deposited price.

Risk and Management for Impermanent loss

Given the volatility of cryptocurrencies, it seems like quite the oxymoron for liquidity providers to investors in AMMs liquidity pools. Nevertheless, by understanding how impermanent loss works, liquidity provides can understand this risk much better and the ways to mitigate it.

  • Investing in an AMM bears the risk of losing money to impermanent loss caused by price volatility which is the norm of crypto markets. AMM payout “dividends” to liquidity providers from the gas fees paid by users. This provides an incentive to investors as they are not only able to cover the potential impact of impermanent loss but also gain a profit. Moreover, some AMMs distribute their unique tokens to liquidity providers on top of the gas fees, which can increase the investor's profits substantially.

  • Given that AMM rewards investors through user gas fees, it would be ideal for an investor to provide liquidity during high trading periods. This ensures that there are a lot of gas fees being paid, hence a higher payout to the liquidity providers.

  • Moreover, one can opt to invest in less volatile assets such as stablecoins or large market cap cryptocurrencies like BTC and ETH. Investing in less volatile assets could reduce the chance of price divergence that leads to greater impermanent loss. Furthermore, liquidity pools with large volumes of liquidity are less susceptible to price volatility. Thus, it would be wise to use time-tested and popular AMM to help reduce the risk of volatility and impermanent loss.

  • There are also single-asset liquidity pools which are more or less lending protocols. A single-asset liquidity pool completely eliminates impermanent loss risk, although it will offer significantly lower returns on investment.

  • Finally, as a liquidity investor/ trader, one can use their knowledge of calculating impermanent loss combined with technical analysis to predict/estimate where an asset price might move. This prediction can help to understand how to mitigate the risk potential of impermanent loss.


Share this article:
Trading

Invest in the future of finance today with CoinMENA

Related Articles