What is Impermanent Loss?
When does it occur and how does it work, all explained in a simple example.
If you have been in a crypto community for a while, you may have heard the term impermanent loss thrown around. In this article, I’m going to explain everything about this concept and demonstrate it on an example.
What is Impermanent Loss
Impermanent loss is a temporary loss that can occur in certain instances when providing liquidity to a liquidity pool through automated market marker (AMM), which is a special kind of market you can find e.g. on PancakeSwap, UniSwap or other similar DEXes.
This loss is caused by a change in prices of — and therefore change of the ratio between — the two assets you are locking into a pool. That can happen when the price (of one or both of the assets) changes in either direction (falls or rises), which in turn causes you to make less profit than you would make simply by holding both assets instead. The impermanent loss is then the difference between the realized profit and the potential profit you could have had, had you only held the assets and hadn’t locked them into the pool. However, the loss itself isn’t caused by a change in a price of an asset per se, but by change of the ratio between the two assets, because AMMs are based on keeping a fixed (usually equivalent) ratio between the two assets in the whole pool.
You can still make a profit from providing liquidity and be a victim of impermanent loss at the same time. The fees you collect from providing liquidity can sometimes mitigate or even negate the loss, but that is not guaranteed.
Important thing to mention is that impermanent loss is unrealized until you actually withdraw your funds from the liquidity pool. It is up to you to calculate the change of price(s) and the additional profit from fees, to see whether or not it is worth to withdraw.
This may have sound very theoretical, so let’s see it happen in practice:
Let’s imagine a scenario…
You found a liquidity pool you want to invest in. As in many other AMMs, even in this market the deposited pair needs to be of equal value (therefore, the equal distribution of value is kept throughout the whole pool). You decide to deposit 1 BTC and 50 ETH, both worth 1000$. The total of your deposit is 2000$ at this time.
Additionally, there are total of 10 BTC and 500 ETH in the pool, which are provided by you and other liquidity providers. The total liquidity is 5000 and you own 10% share of the pool.
Then, the price of BTC changes. 1 BTC is now worth 200 ETH. While the total liquidity in the pool stays the same, the ratio of the two assets changes in order to reflect the new price. This in practice happens through arbitrage traders who will add ETH and subtract BTC from the pool, until a new ratio (reflecting the new price) is reached.
Because 1 BTC is now worth 200 ETH, the ratio in the pool changed from previous 10 BTC and 500 ETH to 5 BTC and 1000 ETH. The total liquidity is still 5000.
What happens if you decide to withdraw your funds now? As was mentioned earlier, you are entitled to 10% of the pool. That is 0,5 BTC and 100 ETH, which now totals 4000$. Wow, that is a nice profit, right? Actually, not really. If you had instead only held your initial 1 BTC and 50 ETH, their combined value would now be 5000$. That’s a 1000$ difference and that’s impermanent loss.
Even if you would gain let’s say 500$ on fees, in this particular example, it wouldn’t be enough to make the whole operation more profitable than simple holding.
Phew, that was a lot of counting…
Impermanent loss doesn’t have to happen, but it is a risk that definitely can occur and it’s best to keep it in mind while investing in liquidity pools.
Hopefully you now have a better understanding of how impermanent loss works and are better equipped to deal with it. Some liquidity pools, typically the ones with stablecoins, are less risky, because the prices of those assets aren’t as volatile (and the ratio between them doesn’t change as much) as some other ones.