Impermanent Loss: Understanding, calculating, and managing this risk

Impermanent loss is a concept that can become important for investors in DeFi (decentralized finance). It's a phenomenon that occurs when you provide assets to a liquidity pool and the value of those assets fluctuates unfavorably compared to their initial price.

Table of Contents

The basics of liquidity pools in DeFi

Liquidity pools are reserves of assets deposited by investors, which make cryptocurrency pairs available to enable trading on decentralized platforms ( DEXs ).

Unlike the centralized order books of traditional platforms (such as those used by CEXs ), which work by grouping users' buy and sell offers to find matches, DEXs use liquidity pools to facilitate trading without needing this order matching infrastructure.

Centralized order books connect buyers and sellers by displaying bid and ask prices, but this can lead to delays if no matching order is found on low-liquidity assets.

More information about the rewards can be found here.

In DEXs, users can trade their tokens directly with the pool, without waiting for a counterparty, as liquidity is always available. In exchange for their contribution to these pools, liquidity providers receive a share of the transaction fees generated by the trades carried out within the pool. However, participating in a liquidity pool carries a risk known as impermanent loss .

Impermanent loss in action: How does it work?

Impermanent loss occurs when the prices of two assets in a liquidity pool change unequally. The key to this phenomenon lies in the automatic rebalancing of the assets in the pool, based on the market maker (AMM) .

When the price of one asset rises or falls relative to the other, the pool adjusts the quantities of both assets to maintain a constant ratio (often 50/50) based on their new values. This means you end up with more of the asset that has risen the least and less of the one that has risen the most, compared to what you would have had if you had kept your assets in a single portfolio.

For example, if the price of token A increases significantly relative to token B, the pool will rebalance by selling some token A to buy more token B to maintain that balance. Impermanent loss then occurs because the value of the assets you receive may be less than what you would have had if you had simply kept them in a wallet. 

Although this loss is often temporary, it can have a significant impact on returns if assets continue to fluctuate unevenly.

Automatic calculation of impermanent loss

Impermanent loss can be calculated automatically using several online tools such as Artisandefi .

Why is it called impermanent?

Impermanent loss is so called because it is not necessarily permanent. If asset prices return to their initial value, the loss disappears. However, if you withdraw your assets while price fluctuations are unfavorable, the loss becomes permanent.

Detailed example of an Impermanent Loss calculation

Let's take the example of a liquidity deposit on Raydium of a SOL/RAY pair with a yield of 45% per annum, or 3.75% per month. We assume that SOL increases by 30% and RAY by 60% in one month.

  • SOL/RAY Pool :

  • Initial amount : €1000 from SOL and €1000 from RAY (total of €2000).
  • Initial price of the SOL : 100 €.
  • RAY's initial price : 2 €.
  • Annual return of the pool : 45% (approximately 3.75% per month)
  • We have filed 10 GROUND And 500 RAY in the pool, which gives a constant product:
    10 SOL×500 RAY=5000.

    Here, the constant k = 5000 must remain unchanged.

After 1 month:

  • The price of SOL increases by 30% , so 1 SOL now costs €130.
  • The price of RAY increases by 60% , so 1 RAY now costs €3.20.

The AMM must now adjust the quantities of SOL and RAY to keep the product x * y = k = 5000 constant, while taking into account the new prices.

Calculation of the new quantities after rebalancing:

  1. New price report :

    • The price of the SOL is now €130.
    • The price of the RAY is now €3.20.
    • The price ratio is: 130/3.20≈40.625.

      This means that the ratio between the new quantities of SOL and RAY in the pool must reflect this ratio.

  2. Rebalancing of quantities :

    • To maintain the balance x * y = 5000 , while respecting the price ratio, the new quantities of SOL and RAY in the pool will be adjusted.

    • The new quantities of SOL( x' ) and RAY( y' ) must comply with:

      • x′∗y′=5000

         

      • The ratio between SOL and RAY must be 40.625 , i.e., y ′/x′=40.625, so we have 2 equations and 2 unknowns: we can solve the system.
  3. Quantities adjusted after rebalancing:

    1. New quantity of SOL (x') :
      Let's calculate the new quantity of SOL:

impermanent loss formula
    1. After the rebalancing, we therefore have approximately 11.09 SOL in the pool.

    2. New quantity of RAY (y') :
      Now, using the price ratio between SOL and RAY to maintain balance, the new quantity of RAY will be: y′=k/x′=5000/11.09≈451.15 RAY.

      After rebalancing, we have approximately 451.15 RAY in the pool.

    Asset value after rebalancing:

    1. Soil Value :

      • The new quantity of SOL in the pool is 11.09 SOL , with a price of €130 per SOL.
      • The value of the SOL after rebalancing will therefore be:
        11,09×130=1441,70€
    2. RAY value :

      • The new quantity of RAY in the pool is 451.15 RAY , with a price of €3.20 per RAY.
      • The value of RAY after rebalancing will therefore be:
        451,15×3,20=1443,68 €

    Total value after rebalancing:

    • Total value in the pool after rebalancing:
      €1441.70 (SOL) + €1443.68 (RAY) = €2885.38

    holding strategy (keeping the assets):

    If we had simply kept our cryptocurrencies in a wallet, their value would be:

    • Value of the SOL : 10 SOL * €130 = €1300 .
    • Value of RAY : 500 RAY * €3.20 = €1600 .
     

    Total when holding: 2900 €.

    Calculation of the impermanent loss:

    Impermanent loss is the difference between the value we would have obtained by keeping the assets in our portfolio and the value we would obtain by depositing them in the liquidity pool.

    • Value without impermanent loss (hodl) : 2900 €.
    • Value in the pool after rebalancing : 2885,38 €.
     

    The difference is: 2900−2885,38=14,62€.

    As a percentage, this represents approximately 0.5% impermanent loss.

    Liquidity pool yield:

    Let's not forget the return on the pool , which is 3.75% per month.

    • Monthly return = 3.75% of €2885.38 = €108.20 .
     

    Total value after rebalancing and yield:

    After adding the return, the total value of our investment in the pool will be: 2885,38+108,20=2993,58€.

    Conclusion :

    1. Liquidity pool : After rebalancing and adding the yield, we have €2993.58 .
    2. Hodling : by simply keeping our cryptos, we have €2900 .
     

    In this case, the liquidity pool proves more advantageous than the holding strategy, because the return of the pool compensates for the impermanent loss which is low (approximately 0.5%).

How to compensate for impermanent loss?

The fees generated by the liquidity pool can help offset impermanent losses. In the previous example, the monthly return of 3.75% generates €101.68 , which compensates for impermanent losses.

Alternatives to liquidity pools to avoid impermanent loss

For those who wish to avoid impermanent loss altogether, there are alternatives such as staking or yield farming . These strategies allow you to generate returns without exposing your assets to price fluctuations within a pool.

The best DeFi platforms for liquidity providing

Uniswap , SushiSwap , Raydium  , Aerodrome Finance or are AMMs offering potentially attractive returns for liquidity deposits.

The impact of transaction fees on impermanent loss

Transaction fees generated by pools can play a significant role in offsetting impermanent loss. The higher the trading volume, the higher the fees you, as a liquidity provider, can receive. These transaction fees are reflected in the returns offered by the platform for a given liquidity pair.

Cryptocurrency investments are risky. Crypternon cannot be held liable, directly or indirectly, for any damage or loss resulting from the use of any product or service mentioned in this article. Cryptocurrency investments are inherently risky; readers should conduct their own research before taking any action and only invest within their financial means. This article does not constitute investment advice.

Some links in this article are affiliate links, which means that if you purchase a product or sign up through these links, we will receive a commission from our partner. These commissions do not incur any additional cost to you as a user, and some even allow you to take advantage of promotions.

AMF Recommendations. There is no guaranteed high return; a product with high potential returns implies high risk. This risk must be commensurate with your investment goals, your investment horizon, and your ability to lose some of your savings. Do not invest if you are not prepared to lose all or part of your capital .

To learn more, read our Legal Notices , Privacy Policy and Terms of Use .