dYdX logo
dYdX logodYdX icon
English
中文
日本語
한국어
русский
Türkçe
Français
Português
Español

What Is Impermanent Loss in DeFi? A Guide for Crypto Traders

dYdX
dYdX
Impermanent Loss
dYdX
dYdX

With billions of dollars stored on decentralized exchanges (DEXs), there’s no question this passive income strategy is a hot option with DeFi users. But anyone hunting for yield in this new field should factor a phenomenon known as “impermanent loss” into their equations.  

Sometimes, impermanent loss cuts into a significant chunk of a DeFi trader’s expected earnings. In this guide, we’ll review what impermanent loss is, how to calculate it, and ways to avoid it. 

What is impermanent loss in crypto?

Impermanent loss refers to a comparatively greater drop in value for cryptocurrencies staked on DEXs versus holding the same digital assets in a private wallet. In other words, whenever a trader suffers impermanent loss, their cryptocurrency isn’t as valuable as it could’ve been had they stayed out of DeFi

Traders put themselves at risk of impermanent loss whenever they send cryptocurrency to DeFi protocols known as liquidity pools to earn token rewards or a percentage of a DEX’s trading fees. Liquidity pools are similar to virtual vaults with crypto deposits from users who want to earn yield on their tokens. The cryptocurrencies in liquidity pools are available to DeFi traders interested in swapping tokens directly to their private crypto wallets

Developers use automated blockchain-based smart contract programs to process transactions in liquidity pools without third-party intervention. In this decentralized framework, liquidity pools constantly recalibrate the balance of cryptocurrencies in response to real-time price changes and market demand, which sometimes causes imbalances in each liquidity provider’s contribution. 

Whenever liquidity providers see there’s a steeper decline in their purchasing power relative to holding (or “hodling”) crypto in a wallet, traders experience an impermanent loss. This loss becomes permanent only if a trader withdraws their crypto rather than waiting for market prices to return to more favorable levels. If the rewards a liquidity provider receives for sending crypto to a pool don’t match or exceed the market value of these digital assets, impermanent loss reduces their potential profits or intensifies their losses. 

How does impermanent loss in liquidity pools occur?

Impermanent loss is associated with a specific category of DEXs called automated market makers (AMMs). On AMM DEXs like Uniswap, liquidity providers deposit a 50/50 split of two cryptocurrencies to a liquidity pool for crypto traders. Many DEXs use the equation “x*y=k” — where “x” and “y” are the two cryptocurrencies and “k” is a constant variable — to ensure there’s always an even balance of cryptocurrencies in their liquidity pools. Whenever the market prices of one or both cryptocurrencies in a liquidity pool’s pair change, so does the composition of digital assets in these pools. 

Crypto traders and other liquidity providers regularly add or withdraw virtual currencies from DEXs, which changes the balance of tokens in the liquidity pools. When there are significant price discrepancies between the cryptocurrencies on AMM DEXs versus other DEXs or centralized crypto exchanges (CEXs), traders known as arbitrageurs buy or sell virtual currencies to profit from these market inefficiencies. 

For example, if Ethereum (ETH) trades for $1,600 on Uniswap and $1,650 on Gemini, arbitrageurs simultaneously buy ETH on Uniswap and sell ETH on Gemini for a $50 profit per coin. After arbitrageurs exploit this price difference, they drain a liquidity pool of ETH relative to the paired cryptocurrency, which results in a depreciation of each liquidity provider’s initial investment. 

An impermanent loss example: How to calculate impermanent loss

Each AMM DEX uses unique protocols to adjust the supply of tokens in their liquidity pools, but a standard formula to calculate impermanent loss is as follows: 

  • 2*(√price ratio/(price ratio+1)) - 1

The price ratio measures the change in value between two cryptocurrencies in a liquidity pool. To calculate this number, traders divide the exchange rate between their cryptocurrencies at the time they deposited them into the liquidity pool versus their current exchange rate. 

For example, suppose a trader deposited 1 ETH and 1,600 USDC into an ETH/USDC Uniswap liquidity pool. Since Uniswap uses 50/50 token pairs, 1 ETH is worth $1,600 at the time of the transaction, meaning the first exchange rate is 1,600. If the price per ETH rises to $2,000, traders calculate the price ratio by dividing the initial rate by this new value: 

  • 1,600/2,000 = 0.8

To determine the implications of impermanent loss, plug “0.8” into the place for the price ratio in the equation shared above:

  • 2*(√0.8/(0.8+1)) - 1

  • 2*(√0.8/1.8) - 1

  • 2*(0.894427/1.8) - 1

  • 2*(0.4969) - 1

  • 0.9938 - 1 = - 0.0061

According to this calculation, the impact of impermanent loss on a trader’s deposited ETH and USDC is - 0.61% if ETH stays at $2,000 per coin. In other words, if the trader kept their ETH and USDC in their crypto wallet rather than stake it in a liquidity pool, they’d have 0.61% greater buying power. 

That said, this calculation doesn’t consider the trading fees liquidity providers receive or changes in the total size of deposited assets in the pool. This formula also won’t work for traders using liquidity pools that don’t use a standard 50/50 split. For more advanced calculations, traders use free online impermanent loss calculators to estimate the impact of this phenomenon on their digital assets. For example, the cryptocurrency price aggregator CoinGecko has an “Impermanent Loss Calculator” tool to see the average percentage of liquidity pools for DeFi protocols like Uniswap and Balancer. 

How to avoid impermanent loss in liquidity pools

DeFi developers are working on adjustments and algorithms to reduce the risk of impermanent loss, but there’s no way to avoid this issue with volatile cryptocurrencies on AMM DEXs. There are, however, a few techniques liquidity providers use to mitigate how much impermanent loss eats into their portfolios.

Focus on low-volatility digital assets 

Cryptocurrencies with a history of volatility or wild price swings increase a liquidity provider’s risk of impermanent loss. Conversely, when crypto trading pairs have low volatility, traders don’t have to fear impermanent loss as much. 

Research the historical volatility of different cryptocurrencies and their price correlations to other digital assets, then use impermanent loss calculators to run hypothetical scenarios and find a pair that suits your risk profile. If liquidity providers want to reduce their impermanent loss to zero, focus on stablecoin pairs such as USDC/USDT or USDC/DAI. Since all of the cryptocurrencies in these example pairs are US dollar stablecoins, they have static values equivalent to the USD. Wrapped token pairs such as ETH and wETH also have the same market value, so there’s no risk liquidity providers experience impermanent loss.

Change the percentage of total digital assets 

Besides changing the type of tokens they contribute, some liquidity providers adjust the percentage of the cryptocurrencies they stake on an AMM DEX. 50/50 liquidity pools are the standard option on DEXs like Uniswap, PancakeSwap, and Sushi, but other AMM protocols give users flexibility over their token allocation. 

For example, on the AMM DEX Balancer, liquidity providers have the option to split more than two crypto assets by various percentages. So, instead of depositing 50/50 USDC and ETH, a Balancer liquidity provider may supply 80/20 USDC versus ETH to take advantage of USDC’s stability. Even if ETH’s price changes significantly for this Balancer liquidity provider, they experience less impermanent loss compared to a 50/50 ETH/USDC pair on a DEX like Uniswap. 

Research impermanent loss protection protocols

Impermanent loss protection (ILP) is an experimental feature in some DeFi protocols, which guarantees liquidity providers at least their initial deposit when they withdraw. Even if the price volatility of a crypto pair causes impermanent loss, an ILP DEX has a way to counteract these effects either through using a community treasury or a unique rewards mechanism to ensure traders never lose more than if they simply held their crypto. 

For example, the DEX THORChain has an ILP program promising to cover 100% of impermanent loss if liquidity providers stake their cryptocurrencies for at least 100 days in a liquidity pool (excluding DEX trading fees and rewards). 

Although ILP is an exciting idea, it’s still a new feature and has yet to be battle-tested in DeFi, and traders must recognize it’s not a “guarantee.” Even if DEXs offer ILP, the technology and legality of this offering are still in their early stages, and there are instances when DeFi applications unexpectedly pause this feature.

Find more DeFi deets on dYdX Academy 

As one of the fastest-growing sectors in Web3, DeFi is in a constant state of innovation. When it comes to staying up-to-date on the latest DeFi terminologies and technologies, dYdX Academy has plenty of guides to get you up to speed. Also, don’t forget dYdX offers a low-fee decentralized crypto perpetuals exchange for anyone looking for an industry-leading derivatives trading experience. Check out dYdX’s blog for the news on our latest features, products, and services, and eligible traders can start trading on dYdX today. 

Terms & Conditions and Disclosures

The content of this article (the “Article”) is provided for general informational purposes only. Reference to any specific strategy, technique, product, service, or entity does not constitute an endorsement or recommendation by dYdX Trading Inc., or any affiliate, agent, or representative thereof (“dYdX”). Use of strategies, techniques, products or services referenced in this Article may involve material risks, including the risk of financial losses arising from the volatility, operational loss, or nonconsensual liquidation of digital assets.  The content of this Article does not constitute, and should not be considered, construed, or relied upon as, financial advice, legal advice, tax advice, investment advice, or advice of any other nature; and the content of this Article is not an offer, solicitation or call to action to make any investment, or purchase any crypto asset, of any kind.  dYdX makes no representation, assurance or guarantee as to the accuracy, completeness, timeliness, suitability, or validity of any information in this Article or any third-party website that may be linked to it.  You are solely responsible for conducting independent research, performing due diligence, and/or seeking advice from a professional advisor prior to taking any financial, tax, legal, or investment action.

You may only use the dYdX Services in compliance with the dYdX Terms of Use available here, including the geographic restrictions therein.

Any applicable sponsorship in connection with this Article will be disclosed, and any reference to a sponsor in this Article is for disclosure purposes, or informational in nature, and in any event is not a call to action to make an investment, acquire a service or product, or purchase crypto assets.  This Article does not offer the purchase or sale of any financial instruments or related services.

By accessing this Article and taking any action in connection with the information contained in this Article, you agree that dYdX is not responsible, directly or indirectly, for any errors, omissions, or delays related to this Article, or any damage, injury, or loss incurred in connection with use of or reliance on the content of this Article, including any specific strategy, technique, product, service, or entity that may be referenced in the Article.