Comment on page
Impermanent loss is the temporary loss of funds you experience when you provide liquidity to a liquidity pool because of the volatility in the trading pair.
The greater the volatility of the trading pair, the more exposed you are to impermanent loss.
Impermanent loss also shows how much more money you would have had if you had simply left your assets sitting in your wallet instead of providing liquidity in a liquidity pool.
It is called 'impermanent' because you'll only be affected by the loss when you withdraw your assets from the liquidity pool. Only then will it become permanent.
But so long as your assets remain in the liquidity pool, it isn't a permanent loss as there are chances of the price changes reversing.
Let's use a simple example to further explain impermanent loss.
Imagine you deposit 2 SOLX and $200 worth of a stable coin, for example, USDC into a liquidity pool that requires assets to be in a 50:50 ratio.
This means that the price of 1 SOLX at the time of deposit was 100 USDC.
Also the pool contains 20 SOLX and 2000 USDC provided by other providers. Meaning that you're entitled to 10% share of the pool's liquidity.
So you put in 2 SOLX and 200 USDC which equals $400 into the liquidity pool hoping to get some profits from the trading fees.
Now let's say the price of SOLX goes up to $400.
When this happens, arbitrage traders will realize that they can buy SOLX at your liquidity pool for $100 and sell it at another exchange, say coinbase, for $400.
They do exactly this.
They add USDC to the pool and remove SOLX. They keep doing this until the ratio of the assets reflects the current price.
Note that some liquidity pools adopt an automated market maker model.
Automated market makers do not require order books, like traditional finance institutions, to know the current prices of assets in the pool.
What AMMs do is they use an algorithm that requires the multiplied product of each supplied asset to remain constant.
So even though the ratio of the assets may change because of volatility, the total liquidity (multiplied product of each asset) must remain constant.
The formula some automated market maker use is:
X × Y = K
Where K is the constant.
So back to our example.
In our example, this means:
SOLX (20) × USDC (2000) = 40,000
So when the price of SOLX gets to $400
While the pool's constant of 40,000 remains the same, the ratio of SOLX and USDC changes.
Because of the actions of arbitrage traders, using USDC to buy up SOLX below $400. They keep doing this until the ratio of the two assets reflects the pool's constant of 40,000.
In this case the ratio would change to:
10 $SOLX against $4000 USDC with the total liquidity still worth 40,000
10 SOLX × 4000 USDC = 40,000
If you withdraw your assets at this moment you'd get your 10% share of the pool,
You'd get 1 SOLX and 400 USDC, totalling 800 dollars. You have just made a cool profit of 400 dollars from your initial deposit of 400 dollars.
However if you had not provided your assets to the pool and simply held your 2 SOLX, when SOLX appreciated to $400 you'd have
200 USDC + 2 SOLX totalling $1000
So in this example, your Impermanent loss is $200.
However if you don't withdraw your assets until the price of SOLX goes back to 100 USDC, the loss disappears.
You now know that impermanent loss occurs because of the changes in price of the trading assets in a liquidity pool. However you're unsure how to estimate impermanent loss.
This can be plotted on a graph.
a 1.25x price change causes a 0.6% loss relative to HODLing your assets
a 1.50x price change causes a 2.0% loss relative to HODLing your assets.
a 1.75x price change causes a 3.8% loss relative to HODLing your assets.
a 2x price change causes a 5.7% loss relative to HODLing your assets.
a 3x price change causes a 13.4% loss relative to HODLing your assets.
a 4x price change causes a 20.0% loss relative to HODLing your assets.
a 5x price change causes a 25.5% loss relative to HODLing your assets.
Note that the loss is the same whichever direction the price change occurs in (i.e. a doubling in price results in the same loss as a halving).
Now you may wonder, why provide SOLX/USDC liquidity if you can just hold on to your assets and avoid impermanent loss.
- 1.Trading fees: the trading fees profits you'd make as a liquidity provider will offset the impermanent loss you may experience. Actually you'd be in more profit providing liquidity than simply HODLing your assets.
- 2.You can also gain additional incentives as a liquidity provider. Some liquidity pools offer you liquidity mining programs. This means a way of rewarding you with extra tokens for providing liquidity.
- 3.Another way you can mitigate the effects of impermanent loss is to reinvest the trading fees and profits you earn when providing liquidity.
So despite impermanent loss, providing liquidity is very lucrative.
To conclude, impermanent loss is a necessary loss one must experience in order to enjoy the benefits of providing liquidity. However note that the more volatile your trading pair, the more exposed you are to impermanent loss.