Most of you in the DeFi space using liquidity pools must have encountered impermanent loss during the price movements. When providing liquidity, LPs can make a profit from fees, but you can still suffer a type of loss, which is impermanent loss.
Introduction
Decentralized Finance (DeFi) has opened new opportunities for investors to earn interest on their crypto holdings through—Liquidity Pools (LP). However, just as there are two sides to every coin, liquidity pools can offer high-interest rates on one side and can sometimes lead to a downside risk called— Impermanent Loss.
In this blog, let’s learn about what is impermanent loss and how to minimize it in simple terms to help you understand the concept better.
What is Impermanent Loss?
Impermanent loss happens when the value of your assets at the time of withdrawal is less than the value of the assets you have if you do not deposit the assets in the pool.
Let’s understand this with an example.
Suppose you have deposited an equal amount of ETH and DAI to an ETH-DAI liquidity pool on a Decentralized Exchange (DEX). Now, if the price of ETH goes up on other exchanges, arbitrage traders may likely take advantage of quick profit by purchasing ETH at cheaper rates from this DEX and selling it on other exchanges until the price of DAI balances in the market.
In such a situation, the profits that arbitrage traders make will likely come at the expense of the liquidity providers. This is because they now hold less ETH when compared to their initial deposit. Sometimes, you might not lose your money, but the gains could be relatively less than expected.
This phenomenon is called ‘Impermanent Loss’— you realize the loss once you have withdrawn your funds from the pool. And that before withdrawing, any loss will be on paper and can be mitigated depending on the market movements and investment strategy.
To understand how impermanent loss works, it is vital to first understand liquidity pools (LP) and automated market makers (AMMs).
Liquidity Pools and Automated Market Makers
A liquidity pool typically has two tokens, referred to as token pairs. For example, consider ETH and USDT as a pair. Now, these tokens need to be equal in ratios to make it simpler for users to trade. Here, the ratio of the total value of each token will be 50% of ETH and 50% of USDT.
Simply, liquidity pools are a kind of smart contract-locked system of funds that allows lending and trading in the DeFi markets.
On the other hand, when you buy crypto on the Automated Market Makers, there is no seller. Instead, an algorithm manages all the the amount of each token in the pool. With the size of the pool increasing, the impact of providing liquidity decreases.
AMMs have simplified things for liquidity providers significantly. They are run using algorithms for asset pricing. The most used formula by AMMs is X * Y = K.
Here, X and Y are the reserve amount of each token in the pool, while K is a fixed constant that determines the pool size.
Note: Unlike traditional exchanges, AMMs do not use order books. Instead, they use algorithms and formulas for pricing.
Advantages of Providing Liquidity to Pools
Firstly, with liquidity pools sellers don’t have to worry about connecting to other traders to trade at the same price as them. The algorithms in these pools automatically adjust to the value according to the platform’s exchange rate.
Secondly, liquidity pools have a low market impact, as transactions tend to be smoother since they are based on an algorithm run by smart contracts.
Lastly, many DEXs also provide rewards or incentives for providing liquidity which is another incredible advantage.
The Limitations
The main disadvantage of liquidity pools is that they can sometimes lead to impermanent loss. Another limitation is that, since it is built on a smart contract, there are high chances of losing all your funds in case of any bugs. So, investors should always prefer AMMs which are well established to mitigate the risks beforehand.
What Causes Impermanent Loss?
The simple answer to this question would be— volatility in the crypto realm.
Whenever the price ratio of the 2 tokens in the pool (aka the pool’s price) changes up or down, the LP suffers an impermanent loss. The Impermanent loss is at least zero when the pool’s price is equal to when the LP provides liquidity.
But, the good news here is that this loss could be temporary. If the deposited crypto goes back to the pool’s price when LP provides liquidity, which was deposited initially, your loss is offset before it is realised! The liquidity providers also receive a large portion of the trading fee, which can offset the risk of impermanent loss.
How to Calculate Impermanent Loss (IL)?
If John stakes 1 ETH and 100 USDC where the tokens staked are equivalent to the equal value, then 1 ETH equals 100 USDC.
Let X, Y be John’s amount of ETH and USDC at the time of providing liquidity and X1, Y1 be the amount of ETH and USDC John has after withdrawing liquidity.
In this example, let 1 ETH = 100 USDC
John provides 1 ETH and 100 USDC:
K = X * Y = 1 * 100 = 100
Two weeks later, 1 ETH = 400 USDC
X1 / Y1 = 1 / 400
X1 * Y1 = K = 100 (because K is a constant)
⇒ X1 = 0.5, Y1 = 200.
John initially deposits 1 ETH and 100 USDC (X = 1, Y = 100) into the pool, then withdraws 0.5 ETH and 200 USDC (X1 = 0.5, Y1 = 200)
Then, with 1 ETH = 400 USDC, the amount of USDC that John received after withdrawing from the pool:
X1 * 400 + Y1 = 0.5 * 400 + 200 = 400 (USDC)
Whereas if John did not provide liquidity but holds 1 ETH and 200 USDC up to now, John would have:
X * 400 + Y = 1 * 400 + 100 = 500 (USDC)
In summary, if John had not provided liquidity he would have 500 USDC. Since he did provide liquidity, he only had 400. So his IL is 100 USDC.
Note: Even if the loss does not translate to USD or any other fiat, it is still considered an impermanent loss as the gains are lower than what John could have earned without putting it into a liquidity pool.
Also, if ETH returns to the initial 100 USD value again, the loss will be reversed.
So basically— an impermanent loss is what changes with the dynamism or movements in the crypto market. The difference between the initial investment and the last deposit is due to the market movements.
How to Gauge Impermanent Loss?
Impermanent loss is unpredictable. However, one can gauge and understand its intensity. It is usually based on the sheet value, so if an investor decides to withdraw their funds after experiencing a price change in the crypto or not, the loss is recognized and is considered to become permanent. This is the most common situation.
In order to make profits, arbitrage traders take advantage of price differences across different exchanges to buy assets at lower prices and sell them at a higher price. For instance, when the price of Ethereum increases, traders can purchase ETH at a lower rate on one exchange and sell it for higher on others.
It is imperative to understand that you can witness impermanent loss irrespective of the price movements. The only time you will be termed to have mitigated the impermanent loss is when the pool’s price at the time of the withdrawal is the same as that at the time of the initial deposit.
Which Pools are More Likely Prone to Impermanent Loss?
Typically, the pools with more volatile currency pairings are more prone to impermanent loss than others. If the price of crypto has been fluctuating for some time— it can become a risky crypto pair, with a more likely chance of leading to impermanent loss. Similarly, cryptocurrencies with significant price differences can also result in an impermanent loss compared to similarly priced ones.
However, there is no standard rule of thumb to determine the loss before withdrawing your crypto assets. But instead, some precautionary steps can help you better avoid or handle impermanent loss.
How to Avoid Impermanent Loss?
With the volatile crypto market, impermanent loss is a common phenomenon that most liquidity providers fall prey to. However, there are also several ways you can protect yourself against impermanent loss. Here are some common measures:.
Go for less volatile pairs
Naturally, the easiest way to reduce the risk of impermanent loss is by choosing less volatile pairs. Some examples of crypto pairs with less volatility include USDT and DAI. Even though more volatile pools may seem attractive for their higher rewards, less volatile pairs can help avoid any significant loss occurring. Hence, maintaining low crypto peer volatility is the key to mitigating risk.
Choose ratios wisely
One of the complex problems in liquidity pools is that it requires you to add assets at a 50:50 ratio value. Decentralized protocols such as KyberSwap Elastic, UniSwap V3, and Curve Finance allows its users to provide liquidity to a pool within a custom price range based on their risk scale to overcome this challenge. This can help in managing losses wisely. But, this task can be pretty difficult to crack, so do not skip to Do Your Research!
Wait for the exchange rate to stablise
It is a normal phenomenon that the rates tend to increase in the market when you provide liquidity to a crypto pair. The more the price deviates from your initial deposit, the higher the risk of permanent loss. So simply, you can take a deep breath and wait for the prices to get to normal without withdrawing your crypto. However, this again will be a tricky job to do as the crypto market is volatile, but nonetheless, HODL.
Explore one-sided staking pools
In the market, not all AMMs provide two-sided liquidity pools. There are also AMMs with a single asset type, where you can give a stablecoin to the pool to ensure its solvency. For example, KyberSwap Classic and Bancor are well known single-sided staking pools . When you supply liquidity, you will be getting a cut of the accrued liquidation fees of the platform. As there is only one currency, there is simply no requirement for ratios. Therefore, there is no impermanent loss.
Watch out for the trading fees
Traders are usually required to pay some trading fees for the liquidity pools. The AMMs give a share of these fees to the liquidity providers. Sometimes, these fees are enough to offset the impermanent loss experienced during the liquidity provision. So, it is a good idea to watch out for the AMMs providing some fees for providing liquidity.
Start Small
If you are new to the crypto market and unsure about how impermanent loss can impact your profits, it is always suggested to start with small amounts. This way, you can get the hang of the market and how it works without risking a big loss while learning. This can help you gain some experience to put large amounts into the pools in the future. It can also aid in mitigating loss without having to lose too much of your hard-earned money.
Closing Thoughts
The crypto market is volatile and can sometimes contribute to the risk of impermanent loss. But, this does not make providing liquidity unworthy. With great due diligence and strategy in place, it can also help you earn substantial passive income. So, making your financial decisions based on your risk appetite is always recommended.
Impermanent loss can be a massive setback for novice investors. However, an investor can significantly reduce the impact of impermanent loss by following the above-discussed precautionary ways. However, do not forget to— Do Your Own Research (DYOR) for better results.
Now you know about what is impermanent loss and how to mitigate it in the course of your trading journey.
Want to know more about DeFi? Follow our Kyber Academy.