Impermanent Loss in DeFi: The Complete Guide

Impermanent loss is a risk in DeFi liquidity pools where the value of your deposited assets changes, potentially resulting in less profit than if you had simply held the cryptocurrencies outright.

Written by: Anatol Antonovici   |  Updated December 28, 2023

Reviewed by: Mike Martin

Fact checked by: Ryan Grace

crypto scale

Impermanent loss is a risk affecting liquidity providers who add crypto assets to the pools of decentralized exchanges (DEXs). In this guide, we’ll show you how it works and the best ways to avoid impermanent loss!

Table of Contents

🍒 tasty takeaways

  • Impermanent loss in DeFi occurs when the return on providing liquidity to a DEX is less than holding the assets due to price changes.

     

  • Liquidity providers can offset impermanent loss through trading fees, especially in high-volume pools on major DEXs.

     

  • Risk reduction strategies include participating in stablecoin pools, timing market volatility, and diversifying across multi-asset pools.

Impermanent Loss Summary

Term Description
Impermanent Loss Potential reduction in earnings for LPs in DEXs due to crypto price shifts.
Liquidity Provision DEXs use AMMs for trading; LPs contribute to pools and earn fees.
DEXs Decentralized exchanges that allow for token trading without intermediaries.
AMM Automated Market Maker, a type of DEX that uses algorithmic token pools for pricing.
LP Tokens Tokens received by liquidity providers that represent their share in the pool.
Stablecoins Cryptocurrencies pegged to stable assets like fiat, less prone to impermanent loss.

How Liquidity Provision in DeFi Works

Decentralized crypto exchanges, also known as DEXs, are the second most used application category in DeFi, right after decentralized lending. As of November 2023, DEXs have more than $11.5 billion in total value locked (TVL).

Source: DeFiLlama

DEXs facilitate token trading without middlemen by using an Automated Market Maker (AMM) algorithm instead of a traditional order book.

DEXs operate autonomously with smart contract-based liquidity pools. These pools can represent token pairs or funds comprising multiple tokens. On one side, users trade tokens against these pools by connecting their self-custody wallets, and on the other side, liquidity providers (LPs) add funds to the pools in exchange for rewards from trading fees.

🍒 Go In-Depth: Liquidity Pools Explained

Democratizing Market Making

Anyone can become an LP by adding funds to a liquidity pool. For example, you can connect your tastycrypto Web3 wallet to the USDC/ETH pool on Uniswap and deposit an equal amount of USDC and ETHETH is the native cryptocurrency behind the Ethereum network and USDC is a stablecoin pegged to the US Dollar. 

So why would you want to be a LP? Because you earn the fees customers pay every time they trade the assets within your pool! 

 🎬 Watch a USDC/ETH Liquidity Pool in Action! 

Liquidity provision, AKA liquidity mining, presents a great DeFi yield-generating opportunity. This opportunity, however, comes with risks. In this guide, we will explain impermanent loss, the most significant risk associated with liquidity provision.

What Is Impermanent Loss in DeFi?

Impermanent loss happens when the money you make from providing liquidity to a pool is less than what you would have earned if you had just held the digital assets. This is caused by the price fluctuations of crypto assets within a DEX pool. 

For example, as traders buy ETH from a pool, the percentage of ETH owned goes down in value. Since the price of ETH is going up (that’s why it is being bought) the ETH is not participating in the rally on a 1×1 basis since your ownership of ETH has diminished.  

 

impermanent loss chart

After a time, prices may change significantly compared to when you deposited the assets. The larger the price fluctuation, the more noticeable the impermanent loss.

Pools that comprise stablecoins are less exposed to the risk of impermanent loss, as they smooth out volatility by being pegged to traditional assets, predominantly fiat currencies like the US dollar.

Liquidity Provision Rewards

The risk of impermanent loss is quite large on many DEXs – so why do LPs still move their digital currencies to pools? 

On major DEXs, impermanent loss can still be offset by rewards derived from trading fees

For example, Uniswap typically charges a 0.3% fee on token swaps, which directly goes to LPs. Pools with high trading volumes generate a lot of revenue, helping LPs cover potential losses. Generally speaking, the higher the trading activity the lower the fees, and vice versa. 

The below diagram shows how liquidity pools work on Uniswap; notice the fees earned for this particular pool. 

Source: UniSwap

Impermanent Loss Example

To better understand how impermanent loss occurs, let’s imagine that you are a liquidity provider on Uniswap. Here is how this situation materializes step by step in a hypothetical example:

  • To participate in the USDC/ETH liquidity pool on Uniswap, you need to contribute an equal value of USDC and ETH. Imagine ETH’s price is $1,000 per coin. To join as a Liquidity Provider (LP), you might deposit, for example, 0.5 ETH and 500 USDC, totaling a $1,000 investment at that moment.

     

  • Across all parties invested, the pool has a total 5 ETH and 5,000 USDC, making your contribution 10% of the pool. You receive LP tokens reflecting this percentage, which also indicates your potential earnings from fees.

     

  • Should ETH’s price rise to $4,000, DeFi arbitragers adjust the pool by adding USDC and removing ETH to maintain the price ratio.

     

  • With the total liquidity still represented by 10,000 LP tokens, the actual holdings shift to 2.5 ETH and 10,000 USDC in the pool.

     

  • After redeeming your LP tokens, you’d get 0.25 ETH and 1,000 USDC, now worth $2,000, giving you a $1,000 profit. However, if you had simply kept your 0.5 ETH and 500 USDC, their value would be $2,500, realizing a $1,500 profit, demonstrating the concept of impermanent loss.

Impermanent Loss Calcuations

To better understand the math behind our example, let’s break it down. 

Calculation Details
Initial Investment 0.5 ETH and 500 USDC, totaling $1,000.
Share of the Pool With a pool total of $10,000, a $1,000 contribution represents a 10% share.
Post-Price Increase Pool Composition ETH price rise to $4,000 changes the percentage of assets: the pool's new composition is 2.5 ETH and 10,000 USDC. (originally this was 5ETH and 5,000 USDC)
Withdrawal as an LP 10% share withdrawal equals 0.25 ETH (10% of 2.5 ETH) and 1,000 USDC (10% of 10,000 USDC), totaling $2,000.
HODL Value Holding 0.5 ETH and 500 USDC outside the pool would be worth $2,500 after the ETH price increase (0.5 ETH * $4,000 + 500 USDC).
Impermanent Loss Difference between HODL value ($2,500) and withdrawal value ($2,000) is $500, representing the impermanent loss.

Click to enlarge

The above example shows us impermanent loss, which can also be thought of as opportunity cost – how much would you have made had you not joined a liquidity pool at all? 

In this example, you would have made $500 more had you not joined the pool at all. Note that we didn’t consider revenue from trading fees, which can offset impermanent loss. 

It is called ‘impermanent’ loss because the loss only becomes realized when you withdraw your coins from a pool. 

How Much Can You Lose with Impermanent Loss?

It’s important to note that the degree of impermanent loss incurred depends on the magnitude of the price change of an asset in the pool. The direction doesn’t matter here: either bullish or bearish, the impact is the same.

To estimate the potential loss when providing liquidity, study the below graph:

Source: Medium

The graph shows that the size of the loss compared to holding the crypto outright varies as follows:

  • 1.5x price change = 2.0% loss
  • 2x price change = 5.7% loss
  • 3x price change = 13.4% loss
  • 4x price change = 20.0% loss
  • 5x price change = 25% loss

How to Avoid Impermanent Loss

There are three ways to mitigate the risks associated with impermanent loss.

 

1. Use Stablecoins

The most straightforward way to avoid impermanent loss is to provide liquidity in stablecoin pools. For example, Curve is a well-known DEX hosting many stablecoin pools comprising USDC, USDT, DAI, and other tokens pegged to the US dollar. 

Your rewards will be derived from trading fees here. However, you may lose great opportunities during bull runs since you are holding dollar-pegged crypto. 

 

2. Only Provide Liquidity During Low Volatility

Another approach would be to hold fluctuating cryptocurrencies in liquidity pools for as long as they don’t show high volatility. If the price starts to change considerably, you can withdraw your funds after earning from trading fees. You can use stop-loss orders to close positions automatically. Bear in mind that joining liquidity pools can be expensive in high gas-fee environments. Also, when volatility is low, rewards are also low. 

 

3. Multiple Asset Pools

Decentralized exchanges (DEXs) such as Balancer offer pools that can contain multiple tokens (up to eight), which can help mitigate the risk of impermanent loss. This is because the more diverse the pool’s assets, the less impact the price fluctuation of any single asset has on the overall value of the pool.

Connect to Liquidity Pools with tastycrypto

The tastycrypto self-custody wallet connect to Uniswap, Curve, Balancer, and other liquidity-providing protocols.

Here are some additional benefits you get when you choose to self-custody your digital assets with tastycrypto:

  • In-App Swap: Trade BTC, ETH, and 1,000+ tokens
  • Generate Yield in DeFi: Stake, lend, and become your own market maker
  • NFTs: Buy, sell, and view NFTs in-app

tastycrypto offers both iOS and Android self-custody wallets – download yours today! 👇

FAQs