What is Impermanent Loss?
Impermanent loss is all about risk management rather than loss. Read on to learn how it might be possible not only to mitigate impermanent loss but also to earn higher yields.
Warren Buffet, one of the most successful investors in the world who has a net worth of over 100.6 billion US Dollars has once said:
"Rule No.1: Never lose money. Rule No.2: Never forget rule No.1".
None of us want to suffer losses in our trades, and furthermore in our life. But even then, at times, we are met with losses that are neither under our control nor power.
This article deals with such a loss in the crypto world which is called Impermanent Loss. If you want to know more about this phenomenon in the DeFi space, please read on!
In this article, we would be covering the following topics:
- The background of Impermanent loss
- How does an AMM work?
- What exactly is 'Impermanent loss'?
- Impermanent loss explained with an example
- How to avoid Impermanent Loss?
The Background of Impermanent Loss
DeFi, or Decentralized Finance, has become popular among crypto traders since 2019, but it became a craze in 2020 when DeFi protocols and platforms caught the eyes of traders. The DeFi ecosystem has brought real interest into the crypto world as we see billions of dollars being staked or committed to DeFi protocols in the past few months.
DeFi protocols had seen tremendous growth when liquidity providers started pumping liquidity to the liquidity pools in the hope of earning passive income. Decentralized exchanges like Uniswap, Sushiswap, Pancakeswap, etc. who rely on the Automated Market Maker (AMM) model are at the forefront in this market revolution.
But this revolution has a small danger lurking behind it, and it is called Impermanent Loss. As the name implies, it is a loss that is impermanent by its nature but becomes permanent when the liquidity provider withdraws his funds from the liquidity pool.
To understand this clearly, you should know how an AMM works.
How does an AMM work?
On an AMM-powered protocol, traders usually swap tokens. To swap tokens, traders need enough liquidity. Liquidity comes from liquidity providers.
Suppose a trader wants to buy 1 ETH in exchange for USDT. There should be a pool available where this ETH-USDT exchange is possible. To make things simple, let us assume that 1 ETH is trading for 1000 USDT and vice versa in a liquidity pool.
As the trading volume increases, the need for more funds in the liquidity pool also increases. That is when the liquidity providers come into the picture. They can deposit funds in this pool as a digital currency pair - in this example, it would be ETH-USDT.
One more thing to be noted here is that AMM pools work on a predefined ratio. A liquidity provider cannot deposit funds as per his likes. Whatever he deposits, it should be subject to the ratio followed by that platform. It could be 30-70, 20-80, or 50-50. Generally, the ratio followed is 50-50.
For example, assume that we have a liquidity provider Aaron who wishes to deposit 10 ETH to an ETH-USDT pool. Then he will have to deposit 10,000 USDT along with the 10 ETH to maintain the 50-50 ratio of the liquidity pool (assuming that 1ETH = 1,000 USDT). Therefore the value of ETH and USDT in the liquidity pool will maintain a 50-50 ratio.
Suppose that our liquidity provider, Aaron, is investing in a pool that has a total of 100,000 USDT worth of assets. Aaron is depositing 10ETH and 10,000 USDT. That means his total investment is as below:
10 ETH + 10,000 USDT=> 10,000 USDT + 10,000 USDT = 20,000 USDT
Considering the total volume of the pool as 100,000 USDT, what would be Aaron's share of assets in that particular pool?
It would be 20,000 USDT/100,000 USDT x 100 = 20%.
Therefore, Aaron has a 20% share of assets in the pool he has invested.
The percentage of shares a liquidity provider possesses is noteworthy. Why so? Because a liquidity provider gets tokens for his investment based on this share. These tokens give a liquidity provider the power to withdraw his investment from a pool anytime as he wishes.
In our example, Aaron can withdraw 20% of assets from the liquidity pool at any point in time. He is entitled to that. It is here where the phenomenon of Impermanent Loss plays its role. If the price of the deposited assets in the pool grows significantly, the liquidity provider may suffer from an impermanent loss. You must be curious to know how this could happen. Let us delve more into the topic.
What exactly is Impermanent Loss?
Impermanent loss occurs when you provide liquidity to a liquidity pool, and the price of your deposited assets changes compared to when you deposited them. The bigger the change, the more the impermanent loss! In other words, the loss means less dollar value at the time of withdrawal than at the time of deposit.
The liquidity pools with assets that are not subject to much price deviation are less exposed to impermanent loss. For example, pools that trade in stablecoins or wrapped versions of a coin are comparatively safer bets for liquidity providers. They do not undergo much price deviation, and therefore they are less prone to impermanent loss.
If providing liquidity results in impermanent loss, why do liquidity providers keep on depositing assets in the liquidity pools? Well, there lies the secret! It is possible to mitigate impermanent loss using the rewards the liquidity providers get in the form of tokens for providing liquidity in the pool.
The DeFi platform Uniswap charges its traders 0.3% on every trade, and this trading fee directly goes to liquidity providers depending on their share of assets locked in the pool. If the trading volume of a liquidity pool is high, there are chances that liquidity providers may not suffer impermanent loss.
The probable loss can be counteracted by the trading fee given by the traders in the platform. However, the mitigation of impermanent loss depends on different factors such as the underlying protocol of the platform, the specific liquidity pool where the trade happens, the locked-in assets, and even wider market conditions.
Impermanent loss explained with an example
Let us take the example of our previous LP, Aaron, again. Aaron deposits in a liquidity pool where the protocol ensures that the deposited token pair ETH-USDT is in a 50:50 ratio. Let us assume that the price of 1 ETH is equivalent to the cost of 100 USDT at the time of deposit (1 ETH = 100 USDT). Let us also consider that ETH is pegged to the US Dollar and 1ETH costs 100$ at the time of deposit. Therefore, the total value of Aaron's deposit would be :
1ETH (costing 100$) + 100 USDT (costing 100$) = 200$.
That is, the total monetary value of Aaron's deposit is equivalent to 200 US Dollar at the time of deposit.
Let the total asset in the pool be 10 ETH and 1,000 USDT funded by other liquidity providers just like Aaron. So, Aaron has a 10% share of the pool, and the total liquidity of the pool is 10,000.
Let’s say that the price of 1 ETH increases to 400 USDT. When this price deviation happens, arbitrage trading occurs. The arbitrage traders will add more USDT to the pool and remove ETH from it until the ratio reflects the current price.
Since Automated Market Makers do not have order books, the price of the assets in the pool is the ratio between them in the pool. Since liquidity remains constant in the pool (as 10,000), the ratio of the assets in the pool will have to change.
Now that ETH is 400 USDT, the ratio between the quantities of ETH and USDT in the pool also would change. After the work of arbitrage traders, let us assume that there is now 5 ETH and 2,000 USDT left in the pool. At this point, Aaron decides to withdraw his funds. How much is he entitled to withdraw from the liquidity pool? We have already seen that he rightfully deserves a 10% share of the pool.
Therefore, Aaron can withdraw 0.5 ETH and 200 USDT from the 5 ETH- 2000USDT pool, which yields him a monetary value of 400 US dollars. Aaron has made profits for sure. His initial deposit was just worth 200$, but now he has gained 400$.
But what would have happened if he had not provided liquidity to the pool in the first place? In that case, his wallet would have had 1 ETH and 100 USDT that would be worth 500$. This loss of 100$ is actually the impermanent loss for Aaron. Aaron would have been better off by holding on to his assets rather than investing them in the pool.
And why was this loss of his called an impermanent loss? That’s because Aaron suffered a loss of 100$ only when he withdrew his investment from the pool. Suppose that he is not withdrawing his assets for the time being and stay afloat in the market. There are chances that after some more fluctuations the cost of ETH comes back to 100 USDT as in the initial case.
If that happens, then Aaron has no loss and he is better off. Therefore we can say that impermanent loss becomes permanent only when a liquidity provider withdraws his share from the pool after a price fluctuation.
Again in this example, we have not taken into consideration the fees a liquidity provider would have received for the trades that happen in the pool. In many cases, the fees earned would nullify the losses and make providing liquidity profitable nevertheless.
How to avoid impermanent loss?
Is there a way to avoid or stop impermanent loss? The direct answer to this question would be a ‘No’. It is not possible to avoid impermanent loss. Even then, there are ways to nullify the impermanent loss to an extent. Some of the methods to mitigate impermanent loss are briefly explained below.
1. Provide liquidity to stablecoin pairs.
One of the best ways to get rid of impermanent loss is to provide liquidity to liquidity pools that consist of two stablecoins such as USDC-USDT.
In a bull market, holding stablecoins and providing liquidity to such a pair is not that appealing as you will not get crazy returns. But, in a bear market, providing liquidity to a pair like USDC-USDT would earn you trading fees while not losing any money in the falling market.
2. Avoid risky and volatile cryptocurrency pairs.
The idea here is not to avoid volatile cryptocurrencies altogether. Preferably, it is better to consider the future performance of both cryptocurrencies in a pair against each other.
3. Provide liquidity to pools with unevenly weighted cryptocurrencies.
Most AMMs are forks of Uniswap with new features or underlying mechanisms. Balancer allows users to create pools with more than two tokens with different weights for each token, and trading fees being charged between 0.0001% and 10%. AMMs with unevenly weighted crypto incur a less impermanent loss.
4. Provide liquidity to incentivized liquidity pools and participate in liquidity mining.
To minimize your losses as a liquidity provider, you can participate in liquidity mining programs (yield farming) or provide liquidity to incentivized pools. Many such options are available nowadays.
5. Providing liquidity to Mooniswap (1inch Liquidity Protocol).
Mooniswap is an AMM launched by the 1inch team. Being a Uniswap competitor, Mooniswap aims to lower impermanent loss for liquidity providers with its different approach to exchange rates.
The platform introduces virtual balances that decrease the profit of arbitrageurs due to temporarily mispriced pools, leaving more profit for liquidity providers.
6. Do not remove liquidity till the exchange rate returns to the initial rate.
If the price deviation is higher, the impermanent loss would also be higher. Therefore it would be better if a liquidity provider could wait until the deviated price in the AMM returns to normal and then exit from the pool. In this manner, the impermanent loss is near to zero.
FAQs
1. What is Automated Market Maker (AMM)?
An Automated Market Maker (AMM) is a decentralized exchange (DEX) protocol that uses a mathematical formula to calculate the value of assets. AMMs do not have order books. Here assets are being priced with the help of pricing algorithms.
This pricing formula can be different for each protocol. Let us take the example of Uniswap, a popular DeFi protocol. It uses the following formula:
x * y = k, where x is the amount of one token in the liquidity pool, and y is the amount of the other token in the pool.
Here you can see that k is always a fixed constant. It means that the pool's total liquidity amount has to be maintained the same, whatever happens. An AMM works on trading pairs, like ETH/DAI or ETH/USDT. It is not necessary to have a counterparty at the other end to make the trade. More than a peer-to-peer trade, a peer-to-contract trade happens here. Since there are no order books involved, there are no order types too.
In this scenario, the Liquidity Providers who fund liquidity in the smart contract create the market. The liquidity provider gets a fee for his deposit of assets in the pool.
2. What is a Liquidity Pool?
Consider the liquidity pool as a big pile of funds that traders can use for their trade. Liquidity providers (LPs) provide funds to these liquidity pools. Liquidity Providers receive fees in return for providing funds to the liquidity pool.
If we take the example of Uniswap, where the trading happens in a trading pair, a liquidity provider has to deposit an equivalent value of the tokens into a pool. That means if Unisawp has an ETH/DAI pool, then a liquidity provider has to deposit 50% ETH and 50% DAI to the ETH/DAI pool. Therefore anyone can become a market maker here. Thus it is easy to add funds to a liquidity pool.
If you want to trade in Uniswap, a trader needs to pay a 0.3% fee for using the platform and borrowing funds. This fee goes to a liquidity provider depending upon his share of investment in the liquidity pool. The point here is, the underlying protocol determines the reward system of a liquidity provider.
Before you go...
From the above discussions, it is clear that we cannot avoid impermanent loss, it can only be mitigated. Impermanent loss is all about risk management rather than loss. Remember, this loss comes in effect only if the liquidity provider withdraws his share from the liquidity pool. As long as he remains invested, the impermanent loss is not affected.
There will be newer and more innovative AMM solutions coming to the DeFi space to address this issue. With the new advancements, it might be possible not only to mitigate impermanent loss but also to earn higher yields. Let us hope for the induction of innovative AMM solutions sooner and welcome them to make our DeFi space more welcoming to new traders.