Blog > Trading Tips > Articles

Impermanent Loss Explained

Impermanent loss is one of the most intimate experiences liquidity providers ever have with their money. When you deposit tokens into a liquidity pool and its price changes a few days later, the amount of money lost due to that change is your impermanent loss. This loss affects you, the liquidity provider but, at the same time, involves so many other people. It’s a messy affair most of us aren’t prepared for when we decide to stake our tokens to earn trading fees on Uniswap. It takes a special kind of scrutiny to understand impermanent loss and how to determine how much you actually lose. There are fancy equations and formulas that can get to the precise decimal of that amount. The good news is, we’re going to simplify all that shenanigans. Learn about the presence of impermanent loss when providing liquidity and the risks of using an AMM (automated market maker) in this article. Automated Market Makers and Liquidity Pools Let’s start with where it all started.  Decentralized exchanges use a system called automated market maker that allows any token holder to deposit their tokens into a liquidity pool. The token pair is usually Ethereum-based and a stablecoin like DAI.  So, when a trader needs to swap Ethereum for DAI, they can come to the pool, put some ETH into it and take the equivalent in DAI, minus a transaction fee (0.3%.) That transaction fee will be paid to the people who have deposited into the pool, aka liquidity providers. A liquidity pool must contain a 50/50 ratio in the value of both tokens. For example, DAI is pegged to the US dollar so 1 DAI is always $1. If an ETH is worth 100 DAI and there are 10 ETH in the pool, there must be 1000 DAI. Also, note that the token prices in this pool are only affected by the ratio between them and not the prices on external markets. When depositing into a pool, you must also put an equal amount in value for both tokens. So, if you want to stake 1 ETH, you need to put in 100 DAI as well. Then, if the entire pool contains 10 ETH and 1000 DAI after your deposit, your total share is 10%.  When you decide to withdraw, 10% of the total transaction fees (0.3%) made up to that point is what you’d earn. Let’s say the ETH price remains the same, and there had been 100 ETH worth of trade volumes before your withdrawal. This would result in a 0.3 ETH earning for the liquid providers. Remember that the value of ETH and DAI must be equal at all times, so 0.3 ETH translates to 0.15 ETH and 15 DAI. The liquidity pool now has 10.15 ETH and 1,015 DAI. With a 10% share at this point, you’ve made a profit. How Does Impermanent Loss Occur? So now we know how liquidity providers make an earning in a perfect scenario where prices are a peaceful candlestick. Unfortunately, volatility is a part of life in the crypto realm, and prices change often. Impermanent loss happens when the price of your token changes after you deposit it in the liquidity pool. From the above example, if the price of ETH goes up to $200, you’ll now be looking at a 1 ETH per 200 DAI exchange rate. At this point, you’ll realize had you held on to your 1 ETH and 100 DAI,  you would have had $300, meaning $100 in profit. But since you’ve deposited it into the liquidity pool, you’re stuck with the original price, resulting in a 50% impermanent loss.  The good news is this loss could be temporary. If ETH later goes back down to the original price at your deposit, then you break even. Estimating Impermanent Loss Impermanent loss is based on sheet value, meaning it can keep changing until an action is taken. When you decide to withdraw after a price change, your loss will become permanent.  This is when things get interesting because you will get a much different figure than what you initially thought. When ETH price goes up, there’ s a window of opportunity for arbitrage traders to swoop in and buy the token for cheap.  Since the new rate for ETH is 200 DAI and the old price in the liquidity pool is 100, traders can replace Ethereum and put in DAI until the ratio reflects the new rate. There is an intense formula behind calculating this ratio, but you can use a web calculator to get the exact amount. Remember that there are 10 ETH and 1000 DAI in your pool. Now, using the calculator to plug in the new ETH price at 200 DAI, we get a new ratio. 10 ETH/1000 DAI ⇒ 7.07 ETH/1,414.21 DAI. As you can see, the arbitrage traders have gotten away with 2.93 ETH for 414 DAI. On the other hand, you still have a 10% share of the new ratio. If you withdraw, you’d end up with 0.707 ETH x 200 + 141.421 DAI = $282. This is still more than what you started with, which is $200, but if you had not deposited, you would have had $300, instead. Takeaway All the calculations did not account for the trading fees you would have earned along the way, regardless of imperm anent losses. Most would argue that the earnings would eventually cancel out the price changes.  While that may be true, the problem is we can’t use our income to cover our losses. This is why one should only stake their tokens after thorough consideration, including risk calculations as mentioned above. Start small and only with what you can afford to lose because the bigger your deposit, the bigger the impermanent loss when prices change. One of the best ways to overcome impermanent loss is to look beyond it. The tokens you’ve committed already have a purpose, which is to earn you trading fees. Let them do their job for the more you put into the equation, the less you might get out of it. Buy and Trade cryptocurrency on Liquid If you are interested in cryptocurrency investments, create a free account on Liquid and enjoy access to over 100 cryptocurrencies via simple purchases with your bank card. Liquid offers high-performance API, deep liquidity, some of the most unique trading experiences in the industry with a wide variety of assets, all in one platform. 
Impermanent Loss explained

Table of Contents

Impermanent loss is one of the most intimate experiences liquidity providers ever have with their money. When you deposit tokens into a liquidity pool and its price changes a few days later, the amount of money lost due to that change is your impermanent loss.

This loss affects you, the liquidity provider but, at the same time, involves so many other people. It’s a messy affair most of us aren’t prepared for when we decide to stake our tokens to earn trading fees on Uniswap.

It takes a special kind of scrutiny to understand impermanent loss and how to determine how much you actually lose. There are fancy equations and formulas that can get to the precise decimal of that amount.

The good news is, we’re going to simplify all that shenanigans. Learn about the presence of impermanent loss when providing liquidity and the risks of using an AMM (automated market maker) in this article.

Automated Market Makers and Liquidity Pools

Let’s start with where it all started. 

Decentralized exchanges use a system called automated market maker that allows any token holder to deposit their tokens into a liquidity pool. The token pair is usually Ethereum-based and a stablecoin like DAI. 

So, when a trader needs to swap Ethereum for DAI, they can come to the pool, put some ETH into it and take the equivalent in DAI, minus a transaction fee (0.3%.) That transaction fee will be paid to the people who have deposited into the pool, aka liquidity providers.

A liquidity pool must contain a 50/50 ratio in the value of both tokens. For example, DAI is pegged to the US dollar so 1 DAI is always $1. If an ETH is worth 100 DAI and there are 10 ETH in the pool, there must be 1000 DAI. Also, note that the token prices in this pool are only affected by the ratio between them and not the prices on external markets.

When depositing into a pool, you must also put an equal amount in value for both tokens. So, if you want to stake 1 ETH, you need to put in 100 DAI as well. Then, if the entire pool contains 10 ETH and 1000 DAI after your deposit, your total share is 10%. 

When you decide to withdraw, 10% of the total transaction fees (0.3%) made up to that point is what you’d earn. Let’s say the ETH price remains the same, and there had been 100 ETH worth of trade volumes before your withdrawal. This would result in a 0.3 ETH earning for the liquid providers.

Remember that the value of ETH and DAI must be equal at all times, so 0.3 ETH translates to 0.15 ETH and 15 DAI. The liquidity pool now has 10.15 ETH and 1,015 DAI. With a 10% share at this point, you’ve made a profit.

2Button-image_210615-01-png

How Does Impermanent Loss Occur?

So now we know how liquidity providers make an earning in a perfect scenario where prices are a peaceful candlestick. Unfortunately, volatility is a part of life in the crypto realm, and prices change often.

Impermanent loss happens when the price of your token changes after you deposit it in the liquidity pool.

From the above example, if the price of ETH goes up to $200, you’ll now be looking at a 1 ETH per 200 DAI exchange rate.

At this point, you’ll realize had you held on to your 1 ETH and 100 DAI, 

you would have had $300, meaning $100 in profit. But since you’ve deposited it into the liquidity pool, you’re stuck with the original price, resulting in a 50% impermanent loss. 

The good news is this loss could be temporary. If ETH later goes back down to the original price at your deposit, then you break even.

Estimating Impermanent Loss

Impermanent loss is based on sheet value, meaning it can keep changing until an action is taken. When you decide to withdraw after a price change, your loss will become permanent. 

This is when things get interesting because you will get a much different figure than what you initially thought. When ETH price goes up, there’

s a window of opportunity for arbitrage traders to swoop in and buy the token for cheap. 

Since the new rate for ETH is 200 DAI and the old price in the liquidity pool is 100, traders can replace Ethereum and put in DAI until the ratio reflects the new rate. There is an intense formula behind calculating this ratio, but you can use a web calculator to get the exact amount.

Remember that there are 10 ETH and 1000 DAI in your pool. Now, using the calculator to plug in the new ETH price at 200 DAI, we get a new ratio.

10 ETH/1000 DAI ⇒ 7.07 ETH/1,414.21 DAI.

As you can see, the arbitrage traders have gotten away with 2.93 ETH for 414 DAI. On the other hand, you still have a 10% share of the new ratio. If you withdraw, you’d end up with 0.707 ETH x 200 + 141.421 DAI = $282.

This is still more than what you started with, which is $200, but if you had not deposited, you would have had $300, instead.

Takeaway

All the calculations did not account for the trading fees you would have earned along the way, regardless of imperm

anent losses. Most would argue that the earnings would eventually cancel out the price changes. 

While that may be true, the problem is we can’t use our income to cover our losses. This is why one should only stake their tokens after thorough consideration, including risk calculations as mentioned above. Start small and only with what you can afford to lose because the bigger your deposit, the bigger the impermanent loss when prices change.

One of the best ways to overcome impermanent loss is to look beyond it. The tokens you’ve committed already have a purpose, which is to earn you trading fees. Let them do their job for the more you put into the equation, the less you might get out of it.

Sign-up today

Buy and Trade cryptocurrency on Liquid

If you are interested in cryptocurrency investments, create a free account on Liquid and enjoy access to over 100 cryptocurrencies via simple purchases with your bank card.

Liquid offers high-performance API, deep liquidity, some of the most unique trading experiences in the industry with a wide variety of assets, all in one platform

Share this article

  • Share on Twitter
  • Share on Facebook
  • Share on LinkedIN
  • Share on Telegram
  • Share Link

Related Articles

January 31, 2021

Yield Farming Explained

While exploring potential methods to expand your cryptocurrency asset portfolio, you must have come across the concept...
August 11, 2021

How is Cryptocurrency Taxed?

Do you own, trade, or pay in cryptocurrencies? If you answer yes, then it’s essential that you understand the financial...
November 5, 2021

Understand Bitcoin Transactions in Less than...

Bitcoin may be a household name, but fully knowing how it works is still a mystery to some. The whole idea surrounding...