Last updated on August 28th, 2023 at 01:50 pm
Have you ever provided liquidity to a liquidity pool just to see your profits diminishing?
If you have interacted with Automated Market Makers [AMM] such as Uniswap or Balancer as a liquidity provider, you might have come across the term “impermanent loss”.
Impermanent loss is annoying.
Fortunately, there are some strategies that liquidity providers can use to mitigate or even avoid it. In this article, you will learn what impermanent loss is and how you can avoid it.
Let’s dive in.
Understanding Impermanent Loss
Impermanent loss is a phenomenon in DeFi that occurs due to the algorithmically driven token rebalancing formula of AMMs or Automated Market Makers.
AMMs are an integral part of the DeFi ecosystem as they allow users to trade digital assets in a permissionless and decentralized manner. They offer a new way of trading that does not rely on the traditional interaction between buyers and sellers. It allows the exchange of assets through liquidity pools whose prices are determined by a constant mathematical formula.
For example, In a Balancer USDC/ETH liquidity pool, when users provide liquidity to a liquidity pool, they incur a temporary loss of funds. This is because there is a difference between the price of the asset within the liquidity pool and the price of the asset outside it.
Such divergence is most commonly seen in liquidity pools where the liquidity provider has to provide both the assets in the specified ratio, and one of the assets is relatively volatile in comparison to the other.
If the value of ETH goes up, the liquidity pool depends on arbitrageurs to ensure that the price of the assets in the pool is the same as that outside the pool. This is critical to ensure that the same ratio of both tokens is maintained in the pool.
This price appreciation leads to a scenario where the profit is taken away from the liquidity providers. However, this loss is only temporary. If at this point, the liquidity provider decides to withdraw their funds, the impermanent loss becomes permanent.
An Example Of Impermanent Loss
For example, A liquidity provider provides liquidity to a Uniswap USDC/ETH 50/50 pool.
To provide liquidity to this pool, the LP will have to provide an equal value of both the tokens to this pool.
Asset | Price | Supply | Value |
USDC | $1 | 10,000 | $10,000 |
ETH | $500 | 20 | $10,000 |
This is where arbitrageurs come into play in the market. An arbitrageur notices the divergence in price and uses this as an opportunity to make a quick profit.
Let’s assume that on Binance, the price of ETH goes up by 10% and is now $550.
A protocol like Uniswap uses a constant product market maker to maintain the ratio of tokens in a pool.
The constant product formula is: x * y = k
As more people try to make use of this opportunity, the price of ETH goes up in the pool as well. The arbitrageur uses the pool on Uniswap to buy cheaper ETH until there is no discrepancy between the price in the pool and the price on the exchange.
How much ETH will the arbitrageur have to buy to make this happen?
Let’s find out…
By using our external price of $1,100 ETH into the formulas derived from the constant product market maker formula, we see the following:
- When the price of ETH is $1,100 in the pool, there will be 10,488.09 USDC and 19.07 ETH in the pool.
- The arbitrageur is able to use this opportunity to buy 0.93 ETH which is needed to achieve equilibrium between the two prices.
- This would cost the arbitrageur 488.09 USDC and they would be able to achieve the average price of 524.83 USDC per ETH.
- The ETH bought can be sold instantly on any other exchange at $550.
- Using this opportunity, the arbitrageur earned $25 excluding the fees.
Let’s find out how this affected the liquidity provider.
If LP provides liquidity | Initial | After Price Goes Up |
USDC | 10,000 | 10,488.09 |
ETH (Quantity) | 20 | 19.07 |
ETH (Value) | $500 | $550 |
Total | $20,000 | $20,976.59 (A) |
If LP had held his assets | Initial | After Price Goes Up |
USDC | 10,000 | 10,000 |
ETH (Quantity) | 20 | 20 |
ETH (Value) | $500 | $550 |
Total | $20,000 | $21,000 (B) |
Impermanent Loss = $21,000 (B) – $20,976.59 (A) = $23.41
From the example above, we can see that if the liquidity provider had just held on to their assets rather than providing liquidity, they would have had $23.41 more.
Hence, $23.41 is the liquidity provider’s impermanent loss.
But, it is important to note that this loss is only on paper. If the LP does not withdraw their funds from the pool and the price of ETH goes back to $500, the impermanent loss becomes 0. Whereas, if the LP withdraws their funds, the impermanent loss will become permanent.
If you want to make your own impermanent loss calculations and hypothetical situations, you can check out the Uniswap-centric tool from dailydefi.org.
How To Mitigate Impermanent Loss
Now we know what impermanent loss is, but how do we avoid it?
In many liquidity pools, an impermanent loss is unavoidable. But, in some cases, certain strategies can help you mitigate or even totally avoid it.
Here are some of the impermanent loss mitigation strategies:
-
Use Stablecoin Liquidity Pools
You can consider providing liquidity to liquidity pools that consist of two stable coins as assets. For example, a USDC-DAI liquidity pool. In a bear market, this can be a good strategy to earn passive income while avoiding any loss in the falling market.
-
Avoid Volatile Liquidity Pools
Other crypto assets like ETH are not pegged to a real-world asset as in the case of stable coins. As a result, the value of these assets fluctuates according to market conditions. Smaller coins or Altcoins have much higher chances of experiencing massive intraday price swings. As a result, they are one of the biggest sources of impermanent loss risk.
-
Provide Liquidity For Same-Pegged Asset Liquidity Pool
In the same pegged asset liquidity pools, there is very little volatility. As a result, there is less risk of impermanent loss.
For example. sETH or stETH pegged to ETH and wBTC or renBTC pegged to BTC.
-
Provide Liquidity For Unevenly Weighted Liquidity Pools
These are liquidity pools that use asset ratios other than the traditional 50/50 split. On Uniswap, every pool consists of two tokens with equal weights. But, there are many other AMMs like Balancer, SushiSwap, and others that offer unevenly weighted tokens. Balancer is best known for offering such flexible pools with asset ratios like 95/5, 80/20, 60/40, and others. For instance, you provide liquidity to an 80/20 REN/ETH pool. If the price of REN goes up against the price of ETH, the liquidity providers will be exposed to mostly REN (80% of the pool), and hence, the impermanent loss will be less as compared to if they were providing liquidity to a 50/50 REN/ETH pool.
-
Provide Liquidity For One-Sided Staking Pools
Liquidity providers can explore other opportunities in DeFi. One of the most popular sources of revenue for LPs is through participating in staking pools. Such pools are used to guarantee the solvency of a protocol and accept only one single type of asset.
For example, LPs can supply LUSD stable coins to the stability pool of the lending DApp Liquidity and earn a cut on the protocol’s accrued liquidation fees.
-
Participate In Liquidity Mining Programs
DeFi protocols distribute governance tokens to their initial LPs as a reward. It is a win-win for both parties involved as LPs gain rewards whereas the protocols are able to decentralize governance, bootstrap liquidity, and develop a loyal user base.
For example, if you provide liquidity to SushiSwap liquidity pools, you can stake your LP tokens. As a result, you can earn SUSHI in addition to earning fees.
Moreover, you can also consider providing liquidity to incentivized pools that offer excess returns than others.
In Conclusion,
- Impermanent loss is one of the major problems of DeFi markets. Many believe that problems like impermanent loss are one of the major hurdles to the wider adoption of DeFi.
- The good news is that many solutions have been introduced by different protocols to address this problem. For example, the launch of Uniswap V3 introduced the concept of concentrated liquidity. Here, LPs provide liquidity in a specific range rather than along the entire price curve.
- Using the strategies mentioned above you can reduce or even avoid impermanent loss.
So, have you ever faced impermanent loss? What is your favorite strategy to mitigate its risks?
Comment down below and let us know your thoughts!
If you would like to read more articles like this, follow DeFi Planet on Twitter and LinkedIn.