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 a Liquidity Pool?

Impermanent loss exists because of the way liquidity pools work. So, to explain this phenomenon, we need first to understand what a liquidity pool (LP) is.

In short, an LP is where lenders can deposit two specific assets as liquidity, allowing DeFi users to easily swap between two tokens. Automated Market Makers (AMMs) such as Uniswap or PancakeSwap are decentralized exchanges (DEXs) that contain many such LPs. Using liquidity pools, these DEXs allow users to swap easily between many trading pairs.

Why is There Impermanent Loss?

Impermanent loss occurs when the deposited tokens’ prices change while it is in the liquidity pool. Because of the way LPs work, when you deposit your tokens into the LP, you are essentially locking the value of your token pair to the price it was at the time of the deposit. The greater the price change, 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, they have not made their losses permanent. 

How Can I Avoid Impermanent Loss?

Unfortunately, there will be impermanent loss as long as there are price fluctuations. The only way to avoid impermanent loss is to provide liquidity to two stablecoins. For instance, providing liquidity to a DAI-USDT pool.

How is Impermanent Loss Calculated?

Impermanent loss is the difference between the value of your tokens if you had just held onto them and the value of your tokens in the LP. You could also take it a step further and subtract the fees earned from depositing your tokens in the LP.

To put it simply, say 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, let’s say 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, we can see that if we put our tokens into an LP, they would be worth about $1,414. When we factor in the fees earned from providing liquidity, if they amount to less than $86, there would be an impermanent loss incurred, as you would have more value hodling the two tokens than providing liquidity.

Alternatively, a detailed portfolio tracker such as Harvest by Treehouse can show you any impermanent loss incurred in your portfolio. As seen below, Harvest provides you with a detailed breakdown of your P&L, including impermanent loss. It also provides you with a historical view of your portfolio.

You can also use impermanent loss calculators online such as this to manually keep track of your holdings on a spreadsheet.

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. This is why it is imperative to do thorough research on any project before putting any funds in it. While smart contract risk is always present, it is minimized with projects that have been around for a long time and have been tried and tested.

Is Impermanent Loss a Big Deal?

Ultimately, impermanent loss is, well, impermanent. As the prices of tokens fluctuate, you are also earning rewards and fees from depositing your tokens in the LP, which can make your P&L finicky and hard to calculate. Many protocols also allow you to stake your LP tokens, adding a layer of rewards and further complicating the P&L calculation.

Using a portfolio tracker like Harvest is the best way to keep track of your holdings and make the most of your DeFi assets, whether to deposit your tokens in an LP or simply hodl. That way, you can decide if impermanent loss is a big deal to your specific portfolio and make the best decisions for your portfolio.

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 analyze your DeFi assets comprehensively. Lastly, subscribe to newsletter updates in the box below!