You have no idea. The urge to make a loss-related joke about my portfolio is just too strong. But don’t worry. I am not here to help you cope with a loss. Instead, we are going to talk about something called impermanent loss in crypto. Say what? Is this when you don’t sell crypto despite a crash in a bid to recoup your initial investment? No. Not at all. Instead, it is the loss you experience for providing liquidity to a protocol. Complicated much? Well, that’s what we are here for.

So today, we will walk you through the jargony roads of liquidity pools, liquidity providers, and ultimately the impermanent loss. And eventually, we would end up learning some strategies to avoid this pitfall. Let’s get started.

What Is Impermanent Loss?

Impermanent loss is experienced by a liquidity provider when the prices of tokens in the liquidity pool fluctuate. Larger the price difference between the two assets, the more impermanent loss. In other words, if the liquidity provider had simply held the tokens in their wallet without providing the liquidity, they would have been better off.

You see, in a centralized exchange, there is always a buyer for a seller and vice-versa. This is because your orders are listed in an order book maintained by the centralized exchange.

But what happens in the case of a decentralized exchange or a DEX? You have no central authority to run the show.

So to solve this problem, the concept of liquidity pools was introduced. The idea is to create a pool with two assets typically (Say ETH and BAT) and allow the traders to exchange their crypto (either ETH or BAT in this case) with one another. And based on the demand for a particular asset, its price keeps going up and down within that pool.

Now to create this pool, we need ETH and BAT. Who is going to supply that in a decentralized exchange? Well, it could be you or me or anyone for that matter. People who supply liquidity are known as liquidity providers.

In this case, say I deposit $500 worth of ETH and $500 worth of BAT to the pool. Now for every exchange/trade that happens using this liquidity pool, I am eligible to earn a portion of the trading fee depending on the share of the total liquidity I have provided.

So far, so good? Let us dive into how this act of helping the ecosystem equates to losses for some reason.

How Does Impermanent Loss Happen?

So the next obvious question in this series is how did this happen? Did I just get penalized for doing good?

To break this down, we need to catch hold of the concept of AMMs or Automatic Market Makers.

AMMs

We just discussed how market forces lead to fluctuation in the prices of assets in the liquidity pool. AMMs define the working of a liquidity pool. It works on something called the constant product formula.

X*Y = k

Here, X and Y are the amounts of the two cryptocurrencies in a liquidity pool. And K is the total liquidity in the pool.

In other words, an AMM ensures that the product of these two quantities in the pool always remains the same (Liquidity is maintained). So if the number of one cryptocurrency increases, the other would decrease to maintain this equation.

The liquidity can vary when trading fees are added or when a liquidity provider adds or removes their liquidity.

Impermanent Loss

Now, there are two ways in which a liquidity provider can face Impermanent loss.

1. Change in liquidity

One way would be the change in liquidity. Say you deposit liquidity worth $1000, and the total pool size is $5000. As a norm, you get LP tokens in return. Think of these LP tokens as a representation of your liquidity, a receipt of sorts. All fees rewarded to you will be in the form of these LP tokens. Since you have deposited 20% of the total pool liquidity in this case ($1000/$5000), you get a 20% share of the fees.

But when you are up for withdrawing that liquidity, it is quite likely that someone else would have added more liquidity. Say the pool size has now increased to $10,000. In this case, your LP tokens would accrue only 10% of the fees.

2. Change in asset balance in the pool

The second way is rather unique. Liquidity pools are designed so that the product is always constant.

Say there is a liquidity pool containing $2M of liquidity in ETH and BAT. This pool would have $1M worth of ETH and $1M worth of BAT. As both these tokens fluctuate in value, the balance of the pool will change. People are also swapping their assets using this pool at the same time. For some reason, say this balance shifts to a 60:40 ratio.

At this point, an arbitrage hunter can purchase one of the assets in this pool at a discount and sell it in the open market for a profit. They should be able to do this until the balance is restored to 50:50.

Due to this rebalancing, the number of tokens on either side of the pool gets changed, even though the values have remained the same. But poor liquidity provider is entitled to a percentage of the pool rather than a set amount of tokens or dollar equivalent. This means that when you withdraw from a pool, you may receive more of one token and less of the other.

Depending on how those assets changed in price, you may wind up with a “loss” compared to if you had just left those tokens in your wallet in the first place.

Example of Impermanent Loss

As an example, consider the price of ETH to be $100. There is a liquidity pool where you deposit liquidity worth $20,000 in the following fashion:

$10,000 worth of USDT (10,000 USDT) and $10,000 worth of ETH (100 ETH).

For the sake of simplicity, say you own 100% liquidity of this pool, and there is no trader fee involved.

Now say the price of Ethereum on Uniswap (A decentralized exchange) is $110. There is a clear arbitrage opportunity here. A trader could buy ETH from your pool at $100 and sell it on Uniswap for $110.

By the constant product automated market maker rule, he could buy 4.652 ETH worth $488 from our liquidity pool. After that, the price of ETH in our pool also shot up to $110, i.e., the pool was balanced. If he purchased any more ETH from us, he would bear a loss.

Trader Profits

The trader sold 4.652 ETH at Uniswap for $511.82. The purchase price was $488. Therefore, the trader made a profit of $23.82

Your Profit

The liquidity pool now has $10,488 in USDT and 95.347 ETH.

Or, 95.347 * 110 = $10,488

Total pool value= 10,488 (USDT) + 10,488 (ETH) = $20,976

Total Profits= $976

But wait

What’s the impermanent loss?

If he had not invested this money in the liquidity pool, the LP would have $10,000 in Stablecoin and 100 ETH.

Price of 100 ETH: 100*110 = $11,000

Total Money: 11,000 (ETH)+ 10,000 (Stable Coin) = $21,000

So the impermanent loss is now at = 21,000 (Money he would have had by NOT investing in Liquidity Pool) – 20976 (Money he has)

= $24

Impermanent Loss Calculation

Now that we understand the gravity of the situation, let us find out how to calculate the impermanent loss.

Luckily, we don’t have to go through all these complex mathematics to predict our losses. There are tools readily available to help you with that. All you need to do is input the tokens you are providing liquidity for and the potential upside/downside in the price predicted by you. Let us look at some of them:

1. Daily DeFi

Although Daily DeFi covers all the aspects of decentralized finance, you should look for their impermanent loss calculator for this one. Using the AMM formula, the daily DeFi seeks inputs in the form of current token prices and predicted future prices. The impermanent loss is then calculated based on the data provided.

2. DecentYields

DecentYields aims to provide its users with the best yield farming opportunities. Built into the website is an impermanent loss calculator that requires you to input the current prices of the tokens being staked and calculates the impermanent loss based on the expected percentage change in future prices.

How Do I Know if I Am at Risk of Impermanent Loss? 

Impermanent loss is independent of the price direction of the digital assets. In the example above, we saw how ETH moving up could lead to impermanent loss. However, if ETH had gone down, there would still have been a loss.

As a rule of thumb, if there is a price variation between the assets in the liquidity pool, you would incur this loss. If the prices of these assets go in opposite directions, the loss widens. Also, the impermanent loss varies between 0 to 25% on every transaction.

Moreover, this is called impermanent loss because you realize it only when you withdraw your liquidity. If you suffer from Impermanent loss (IL) due to fluctuations and the price of the assets reaches the same point in the future, IL becomes zero.

Steps to Avoid Impermanent Loss

Truth be told, it is almost impossible to completely avoid impermanent loss. Given the volatile nature of cryptocurrencies, prices are bound to move in either direction, creating this issue. However, there are certain ways by which the impact of IL can be minimized. Let’s discuss them in detail:

1. Share of trading fees

Remember, we discussed that an LP gets a share of the trading fees depending on the amount of liquidity provided by them. Usually, this fee should be enough to offset any impermanent loss. In fact, the difference between this fee and IL is the profit for LPs. So if you are providing liquidity to a famous protocol that is being used regularly by the traders, you are entitled to a regular fee which should ideally take care of the IL in a relatively stable market.

2. Choosing the right pairs

We discussed how the IL increases as the price gap between the assets widens. But what if you choose your assets such that this price gap is the bare minimum? For example, you could provide liquidity for ETH and DAI. DAI being a stablecoin, will always be at $1. Therefore, you have at least stabilized one side of the pair.

It’s even better if you could provide liquidity for wrapped tokens. For example, wETH, also known as wrapped ETH, is Ethereum present on the Polygon blockchain. It always mimics the price of ETH. So if you could provide liquidity for ETH and wETH, the price gap would be minimum.

3. Complex liquidity pools

The key reason behind IL is the ability of AMMs to always maintain a 50:50 ratio within the pool. What if you could tweak this percentage in your favor to minimize the IL? Some protocols like Balancer and Curve provide different options for liquidity ratios. They also have liquidity pools with more than one asset.

4. One-sided pools

Would there be any fluctuation if you only supply one asset to the liquidity pool? The answer is no. Some protocols like Bancor allow you to provide liquidity for a single asset. In contrast, the other side of the liquidity is maintained in the BNT (the native token of the Bancor protocol).

Conclusion

While all of this may sound complicated, it could be a really good passive income opportunity for the ones who dive deeper and invest by understanding the risks. As the space evolves and markets stabilize to an extent, the risk of impermanent loss will go further down. Such factors should not keep you from investing in cryptocurrencies and leveraging the opportunities they offer. So download Mudrex and invest in crypto now.

FAQs

1. Is impermanent loss actually a loss?

No. Impermanent loss is a notional loss. What it means is to realize this loss, you need to withdraw liquidity from a pool. It is called impermanent loss because if you don’t pull out the liquidity from a pool, there is no actual loss.

2. Can you recover the impermanent loss?

Usually, the trading fees should be enough to recover the impermanent loss. In well-adopted protocols, the fee generated covers the IL faced by LPs. For example, during the bull run, Uniswap recorded ~$10B of trading volume in a single day.

3. Can you reverse impermanent loss?

If you don’t withdraw your liquidity from a pool, you don’t realize the impermanent loss. This means if the assets reach the same price at which you provided the liquidity, impermanent loss is reversed. So, if you are good at predicting future prices and the time of your withdrawal accordingly, IL can be reversed. 

Leave a Reply

Your email address will not be published. Required fields are marked *

Trusted by 1M+ Users for Easy Crypto Investments
2M+ Users Trust Mudrex to Buy, Trade and Invest in Crypto!
2M+ Users Trust Mudrex to Buy, Trade and Invest in Crypto!
Invest in 350+ Cryptocurrencies Now!