# What is Impermanent Loss?

## What is impermantent loss in Defi?

Impermanent loss, is a phenomenon that has made its appearance with the advent of decentralized finance (DeFi). The ‘temporary loss’ is the result of an algorithmic rebalancing formula that AMM protocols use.

Simply put, the term ‘temporary loss’ is used to describe the difference in value between holding tokens in an AMM protocol on the one hand and holding those same tokens outside the protocol on the other. Only when prices return to exactly where they were when you entered the pool will there be no more loss. If the price does not return and you were to trade your tokens at that time, you would do so at a loss. The video below explains ‘impermanent loss’ in detail.

## How is impermanent loss calculated?

Because AMM rebalancing formulas prioritize a predetermined ratio, the value of your tokens may differ from the value of those same tokens outside the pool. To better understand how an impermanent loss works exactly, let’s look at an example

## Example Impermanent Loss

Here’s an example to help explain the concept of impermanent loss:

Suppose you provide liquidity to a pool consisting of 50% ETH and 50% USDC, with 1 ETH and 1000 USDC as the tokens added. The initial price of 1 ETH is \$1000 and 1000 USDC is \$1000.

Due to extreme volatility, the price of ETH doubles to \$2000, making the value of 0.5 ETH equal to \$1000, the same as the value of 1000 USDC. The AMM protocol sells 0.5 ETH to keep the ratio balanced and adds 500 USDC to the USDC holdings, resulting in a total value of \$2500.

Now, if you decide to withdraw your tokens from the protocol, you will have 1000 USDC and 0.5 ETH. The value of 1000 USDC is still \$1000, but the value of 0.5 ETH has now increased to \$1000, making the total value \$2000.

However, if the price of ETH continues to rise, the value of 0.5 ETH in your wallet will increase, while the value of 1000 USDC will remain the same. This means that the value of your holdings in the liquidity pool will be lower compared to if you had kept your tokens in your own wallet. This difference in value is the impermanent loss.

In summary, impermanent loss occurs when the price of a token in a liquidity pool increases, causing a loss for the liquidity provider compared to holders of the token outside the protocol.

 Price change Token Reduction token quantity % 1.25x 0.6% Loss 1.5x 2.0% Loss 1.75x 3.8% Loss 2x 5.7% Loss 3x 13.4% Loss 4x 20.0% Loss 5x 25.5% Loss

## Simple calculator

With Simple calculator you can calculate how much ‘impermanent loss’ one is likely to incur before providing liquidity. The initial price of the tokens at the time you are going to provide liquidity and the expected price of the tokens are needed to calculate the ‘impermanent loss’.

### Baller Netlify

You can also play around with the baller app, to see the effect of impermanent loss. Where you can play with a multi-dimensional pools examples. Where the IL will be higher when the assets diverge in prices. ## Conclusion

Simply put, ‘impermanent loss’, is the loss that occurs when providing liquidity compared to just keeping the tokens in your wallet. This is the result of the rebalancing formulas that keeps the balance of the number of tokens in the pool in proportion.

This risk can be solved by using pools with other ratios such as; 80/10 – 95/5 so impermanent loss will not have such a big impact. Impermanent Loss can cause problems during periods of high volatility and so is important to understand when looking to provide liquidity.  