Imagine a trader putting 100 KLV and $10,000 worth of USDT, a stable coin into a liquidity pool. Most liquidity pools are always in a 50:50 ratio, whenever the trader initially starts the deposit.
So, we can assume that the price of one KLV is $100, so that makes a total of $20,000 worth of liquidity the trader is providing to the pool hoping to make a profit.
Now let’s say that the price of KLV rises to $110. So, a trader starts buying KLV at $100 and sells it on another crypto exchange for $110. The trader keeps buying more and more until the price of the pool reaches $110.
As KLV was much cheaper than other exchanges, it created an arbitrage opportunity for traders.
If we calculate, the trader was able to give $488 and buy 4.652 KLV until the liquidity pool price normalized. If the trader has more KLV, he/she will be losing money.
The trader immediately sold the cheaper KLV to another exchange for $511.82 cents, which means the trader made a profit of $23.82, by simply buying & selling between two different liquidity pools.
This means that there is now $10488 of stable coin in the liquidity pool and 95.347 KLV in the pool.
So, if we take 95.347 KLV and multiply by $110 the value comes to around $10,488 and $10,488 of stable coin, total comes to $20,976.
So, the liquidity provider now has $20,976 for $20,000 value invested in the pool, making a profit of $976.
However, if we want to calculate impermanent loss, we need to calculate how much money the trader would have had if he/she didn’t invest in a liquidity pool and just hold his stale coin and KLV in his wallet.
Though, the trader would have had $10,000, but, as KLV has increased by 10% to $110, the trader would have had $11,000, so the trader would have a total of $21,000, if he/she just held it.
Now let’s calculate the trader’s impermanent loss
$21,000 the trader would have in the wallet minus $20,976, the trader earned for putting the money in the liquidity pool, so his impermanent loss is $24.
As $24 might not seem much, imagine if the prices of KLV had doubled or the prices dropped by half.
In short, impermanent loss is caused when the difference between two assets is changed.
As the change increases, so does the impermanent loss. If KLV goes back to $100, there is no impermanent loss.
Impermanent loss only becomes permanent when the trader cashes out of the liquidity pool, until the trader does that, there is still an opportunity for the loss to normal itself.
Impermanent loss is the loss the trader books when he/she has less money investing in the liquidity pool, compared to the value of assets the trader could have had holding the assets.