This article aims to provide insight into impermanent loss. It references liquidity pools and their risks. If you are unfamiliar with crypto, read our articles on blockchaincrypto, and DeFi before reading this article.

What Is Impermanent Loss?

Impermanent loss occurs when users deposit tokens in a liquidity pool, and the market value of the token changes while it is in the pool. When tokens are deposited, the value of the token is locked at the price it was at the time of the deposit. The greater the price difference between the current token value and the value at deposition, the greater the impermanent loss.

Why Is Impermanent Loss Impermanent?

As prices fluctuate, the prices of deposited tokens might return to their value at deposition. As long as lenders have not removed their liquidity before then, their losses will not be made permanent.

What Is a Liquidity Pool?

Impermanent loss exists because of the way liquidity pools work. In order to explain this phenomenon, we need understand what a liquidity pool is.

In short, a liquidity pool is where lenders can deposit two specific assets as liquidity, allowing DeFi users to easily swap between two tokens. Decentralized Exchanges (DEXs) run by automated market makers (AMMs) hold many such pools. Two examples are Uniswap and PancakeSwap. Using liquidity pools, these DEXs allow users to swap easily between many trading pairs.

How Can You Avoid Impermanent Loss?

Unfortunately, there will be impermanent loss as long as there are price fluctuations. One way to mitigate the extent of impermanent loss is to provide liquidity to a pool of two stablecoins such as a DAI-USDT pool. That being said, it is important to note that there will always be risk involved, and relying on stablecoins is not a fail-safe. Read about the depeg of algorithmic stablecoin, TerraUSD (UST), here.

How Is Impermanent Loss Calculated?

Impermanent loss is the difference between the value of tokens if a user had just held onto them in their wallets, and the value of tokens in the liquidity pool. The fees earned from depositing tokens in the pool should also be considered. For better understanding, below is an example: 

You deposit 1 ETH and 500 DAI into a liquidity pool. Assuming the value of both tokens needs to be equal in the pool, ETH is valued at $500, and the value of your deposited assets is $1000 in total. Over time, the value of ETH rises to $1,000. If you had held your tokens, you would have $1,500 worth of tokens. Using Uniswap’s constant product formula, however, your tokens would be worth about $1,414 if you put your tokens into a liquidity pool. Factoring in the fees earned from providing liquidity, if they amount to less than $86, then there would be impermanent loss incurred as you would have had more value HODLing the two tokens than providing liquidity. To HODL refers to “holding on to dear life”, or to hold on to your crypto assets in your wallet without leveraging on them such as placing them in farms, liquidity pools, or staking mechanisms.

Alternatively, a detailed DeFi portfolio tracker and analytics app such as Harvest by Treehouse shows impermanent loss incurred in users’ portfolios. As seen below, Harvest provides a detailed breakdown of historical profit and loss (P&L) and impermanent loss. This helps you keep track of your holdings so you can make the most of your DeFi assets.

Other Risks of Providing Liquidity

Another significant risk is smart contract risk that is present whenever users interact with any smart contract. This is the risk that bugs or loopholes in the smart contract could be exploited by hackers who could drain its funds or otherwise ruin the project’s economy. While smart contract risk is always present, it can be minimized by doing thorough research, or DYOR (do your own research), on any project before putting any funds in it.  For instance, projects that have been audited, and with promising audit reports can be seen as more reliable.

Is Impermanent Loss a Big Deal?

Ultimately, impermanent loss is, well, impermanent. As prices of tokens fluctuate, users are also earning rewards and fees from depositing tokens in the liquidity pool, which can make it difficult to calculate their P&L. Many protocols also allow users to stake liquidity provider (LP) tokens, adding layers of rewards and further complicating the P&L calculation.

New to DeFi? If you found this useful, check out our other Learn DeFi articles to dive deeper into the wonderful world of DeFi! Alternatively, browse our Insights section to read more in-depth analyses on the DeFi space. You can also try out our flagship product, Harvest, to get a comprehensive analysis of your DeFi assets. Lastly, subscribe to newsletter updates in the box below!