Impermanent Loss
Impermanent Loss, sometimes referred to as divergent loss, can simply be put as the opportunity cost of adding liquidity into an AMM pool vs holding the individual tokens.
Impermanent loss occurs when the prices of two assets experience a divergence in price action. For example if two assets increase by 20% no impermanent loss is noticed; however, if one asset increases in value by 20% then a divergence has taken place and some form of impermanent loss would be noticed in the position. This can be reversed by the other token in the pool also increasing 20% or both tokens converging on the same price movement relative to the original amount the user put in the pool. A basic example of impermanent loss followed by reversal scenario are is outlined on the following page.
::: tabs
@tab 50/50 Pools
50/50 Pools
We will start with a simple 50/50 pool featuring COMP/WETH. We take a time when WETH is worth 5,000.00). At the same time COMP is worth 10,000 join.
We check back out our position after a period of time and COMP has doubled, 100% gains straight to 2300.00 at this point, gains of just 15%. We know at this point we will face some impermanent loss. We still have strictly gains but due to our liquidity position we are missing out on some of the theoretical gains.
Here we calculate the invariant from the value function:
V= \prod_t B_t^{W_t} \\\
Our gains will be determined by the invariant ratio, this value can be used for our token balances as well.
For the new token balances we consider the invariant ratio compared to the price action of the individual asset. This proportion will yield the new balance of each token in relation to the initial join amount.
Therefore, because our invariant ratio matches our price action ratio, we have an indicator that there will be no impermanent loss.
New Token Balances can be calculated as follows:
Here we can consider the USD values to be the same in the numerator and denominator therefore not needed to determine the ratio between the two.
We will assume USDC stays at a constant value, BAL increase by 15% to 1.20, and WETH increase 50% to $3750.00.
New Token Balances can be calculated as follows:
:::