What is Impermanent loss and how to calculate it? - FXLeaders

What is Impermanent loss?

Impermanent loss happens when automated market makers’ (AMM) algorithmically-determined formula in DeFi shows a divergence between the price of an asset in and outside a liquidity pool. The AMM eliminates intermediary parties in decentralized exchanges and trade assets from a liquidity pool of tokens supplied by liquidity providers.

The liquidity pool is maintained by a constant algorithm formula that balances the ratio of tokens in the pool. Depreciation leads to a loss in the asset outside of the pool since the AMM calculator prioritizes the ratio.

How to calculate impermanent loss

Impermanent loss is a result of the tokens in a liquidity pool and comparing it to the holding value. In the fund, token pairs should have equal total values. The formula X*Y=K is used in maintaining an equal total value. The calculator requires that the value of one token be the same as the value of another token within the pool. The equal value relationship is the underlying concept of the automated price model.

In a liquidity pool having 50% of token A and 50% of token B, and a trader wants to trade A for B, the quantity of token A reduces, while that of B increases. AMM formula would increase the price of token A compared to that of token B to maintain the value of the two tokens. The bigger the divergence between the tokens, the impermanent loss would be equally greater.

AMM liquidity pools with similar assets have their impermanent loss, largely reduced. Impermanent loss calculation is complex with a larger number of liquidity providers. DeFiPulse, vFat, DeFiLlama, and LiquidityFolio are some of the liquidity tools available in DeFi. DeFi Pulse and DeFiLlama are tracking statistical protocols and vFat is a yield farming calculator. LiquidityFolio is a liquidity tool for managing investments on Uniswap.  

Strategies to mitigate impermanent loss

Impermanent loss can be mitigated by DeFi service providers with the use of staking rewards to cushion liquidity providers. The model provides the liquidity providers with a portion of the platform’s trading fees. The protocols also reward the LPs with the platform’s native tokens that derive their values from the network’s activities to make up for the loss. As volatility increases and trading activities surge, liquidity providers earn more in distributed fees and token rewards.  

Liquidity pools like Uniswap have developed a reward system through project-based tokens. Liquidity provided to the correct balancer could lead to token gains. The tokens can be traded on an exchange or used in other areas in the DeFi protocol. Timing in providing liquidity is important because users providing liquidity during high trading activities would gain a higher return than during low activity seasons.

Can impermanent loss be avoided?

Use of stablecoins pairs

Impermanent losses can be avoided via stablecoins pairs like USDC and USDT. Stablecoins are not prone to volatility, and the risk of impermanent losses reduces considerably. A trader can earn trading fees in the process. The disadvantage of providing liquidity using stablecoins is that there are no gains in the bullish market.  Impermanent loss is also inevitable in periods of high price volatility.

Trading fees

Impermanent losses can be offset with the use of trading fees. Trading fees are charged on all the DeFi transactions, and a part of it is shared with the liquidity providers. The gains from the trading fees could be sufficient to counter the impermanent losses. As the amount of fees collected goes up, the impermanent loss reduces.

Volatility

The currency pairs used in providing liquidity is a factor that could reduce impermanent losses. Liquidity pairs are relatively volatile against each other. If one token in a pair would outperform the other, then impermanent losses would surge.

LP Ratio

Some DeFi protocols use an AMM ratio of 50/50. The ratio increases the aspect of the impermanent loss as the pool attempts to balance the pool’s value. Other decentralized exchanges may have different ratios, and the exchanges can allow the pooling of more than one asset.

Price Deviation

To avoid impermanent loss, a trader should wait for the price of a pair to return to the initial level of entry. Some AMMs may have only a one-currency liquidity pool instead of a two-currency pool. For the DeFi protocols with a one-currency liquidity pool, stablecoins could cushion against volatility that can lead to bigger impermanent losses.

About the author

Eric Nkando // Financial Trader and Technical Analyst
Eric Nkando is a professional forex trader and financial analyst from Nairobi, Kenya. He has 3 years trading experience, with interests in Forex, cryptocurrencies, and commodities. He is a CPA(K) holder and a B.com degree (Finance) graduate. Eric’s market analysis and coverage have featured on leading financial websites including Wikifx and Seeking Alpha