What Is “Impermanent Loss” In Crypto Trading? How To Calculate It?

What Is “Impermanent Loss” In Crypto Trading? How To Calculate It?

Cryptocurrency
August 1, 2022 by Diana Ambolis
807
A token’s price fluctuating after you deposit it in a liquidity pool is an impermanent loss for cryptocurrency liquidity pools (IL). It is strongly tied to temporary loss to engage in yield farming, where you lend your tokens to receive incentives. It differs from staking, though, because, with staking, investors must put money into the
What Is "Impermanent Loss" In Crypto Trading? How To Calculate It?

A token’s price fluctuating after you deposit it in a liquidity pool is an impermanent loss for cryptocurrency liquidity pools (IL).

It is strongly tied to temporary loss to engage in yield farming, where you lend your tokens to receive incentives. It differs from staking, though, because, with staking, investors must put money into the blockchain to validate transactions and blocks to receiving rewards.

On the other hand, yield farming comprises lending your tokens to a liquidity pool or providing liquidity. Rewards vary depending on the procedure. While supplying liquidity has specific concerns, such as liquidation, control, and price hazards, yield farming is more profitable than holding.

The quantity of tokens and liquidity providers in the liquidity pool determines the risk of temporary loss. The token is linked to a second token, typically a stablecoin like Tether (USDT) and an Ethereum-based token like Ether (ETH). Stablecoins and other assets with a limited price range will make pools less susceptible to transient losses. Because of this, stablecoin reduces the danger of temporary loss for liquidity providers.

Why do liquidity providers on automated market makers (AMMs) continue to provide liquidity, given that they are susceptible to more losses? It’s because trading commissions can make up the short-term loss. For instance, pools on Uniswap can be profitable due to trading costs despite being highly prone to momentary loss (0.3 percent ).

What does temporary loss protection entail?

Liquidity providers are covered by Impermanent Loss Protection (ILP), insurance against unforeseen losses.

On conventional AMMs, liquidity provisioning is only profitable if the advantages of farming outweigh the expense of momentary loss. But if the liquidity providers lose money, they can use ILP to shield themselves from the temporary loss.

Tokens must be staked on a farm to activate ILP. To better understand how ILP functions, let’s utilize the Bancor Network as an example. The insurance coverage offered by Bancor increases when a user makes a new deposit at a rate of 1% each day the stake is active, eventually reaching full range after 100 days.

The protocol provides coverage at the time of withdrawal for any temporary loss that occurred within the initial 100 days or at any point after that. For example, following 40 days in the pool, leaves are compensated for any short-term losses at 40%. However, departures made before the 100-day maturity are only eligible for half IL compensation.

There is no IL compensation for stakes withdrawn within the first 30 days; the LP is still responsible for the same IL they would have incurred in a traditional AMM.

What causes impermanent loss?

IL would result from the discrepancy between the LP tokens’ value and the underlying tokens’ hypothetical value if they weren’t paired.

Let’s examine a fictitious circumstance to discover how impermanent/temporary loss manifests itself. Let’s say someone with 10 ETH wishes to contribute to a pool with a 50/50 ETH/USDT split. In this case, they will need to invest 10 ETH and 10,000 USDT (assumed 1 ETH = 1,000 USDT).

Using the straightforward formula (20,000 USDT / 100,000 USDT)*100 = 20%, their share will equal 20% if the pool they commit to has a total asset value of 100,000 USDT (50 ETH and 50,000 USDT).

Calculating the pool’s portion of the liquidity providers

Because a liquidity provider will immediately receive the tokens of the liquidity pool after committing or depositing their assets via a smart contract, their proportion of participation in a collection is also significant. These tokens allow liquidity providers to withdraw their piece of the pool (in this case, 20%) whenever they choose. So, is it possible to lose money due to a temporary loss?

This is where the concept of IL comes into play. Because they are entitled to a share of the pool rather than a set number of tokens, liquidity providers are vulnerable to another type of risk known as IL. So it happens whenever the value of your depository assets changes from the time you deposit them.

Please remember that the liquidity provider will be exposed to more IL the more significant the adjustment. The withdrawal’s dollar value is less than the deposit’s dollar value is referred to as the loss in this instance.

This loss is temporary since if the price of the cryptocurrencies rises, there will be no loss. Additionally, 100% of the trading commissions that reduce exposure to temporary loss risk go to the liquidity providers.

How is the impermanent loss calculated?

Since an algorithm modifies the pool, it manages resources using a formula. Assume that the price doubles and 1 ETH starts trading at 2,000 USDT. In the scenario above, the price of 1 ETH was 1,000 USDT at the time of deposit.

The constant product formula, which Uniswap is popularising, is the most fundamental and extensively utilized. The recipe reads as follows:

Constant product formula

Based on data from our example and 50 ETH and 50,000 USDT, we arrive at:

50 * 50,000 =2,500,000.

Similarly, the following method can be used to determine the price of ETH in the pool:

The cost of ETH is equal to the liquidity of tokens.

i.e., 50,000 / 50 = 1,000.

Currently, 1 ETH costs 2,000 USDT. Therefore,

Calculator for ETH and Token Liquidity

Using the same constant product formula, this may be confirmed:

Token liquidity plus ETH liquidity is equal to 2,500,000 (35.355 x 70, 710.6). (same value as before). We now have the following values:

Old vs. New ETH and USDT Values

The liquidity provider will exchange their tokens for their 20% share of the pool if they choose to withdraw their assets from it at this time. They will then receive 7 ETH (20% of 35 ETH), 14,142 USDT, and their share of the revised quantities for each asset in the pool (i.e., 20 percent of 70,710 USDT).

The sum of the assets withdrawn is now equal to (7 ETH * 2,000 USDT) 28,142 USDT divided by 14,142 USDT. The owner would have made 30,000 USDT [(10 ETH * 2,000 USDT) = 10,000 USD] if these assets could have been non-deposited to a liquidity pool. An impermanent loss is a term used to describe this disparity that might happen due to how AMMs maintain asset ratios. In our examples of temporary loss:

When the liquidity provider withdraws their 20% share, there will be a temporary loss.

How can temporary loss be prevented?

Providers of liquidity cannot prevent temporary loss. However, investors can take some precautions to reduce this risk by utilizing stablecoin pairs and avoiding volatile pairs.

Choosing stablecoin pairs that offer the best bet against IL is one way to prevent temporary loss because their values do not fluctuate significantly, and there are fewer arbitrage opportunities, reducing the risks. On the other side, stablecoin pairs used by liquidity providers cannot benefit from the bullish cryptocurrency market. Select pairs over cryptos with a volatile past that do not expose liquidity to market instability and short-term losses. A further tactic to prevent short-term loss is to research the market, which is often volatile, thoroughly.

As a result, it is anticipated that the value of deposited assets will change. Conversely, liquidity providers need to know when to liquidate their holdings before the price strays too far from the initial rates. As a result of the possibility of a temporary loss of DeFi, major financial institutions refrain from joining liquidity pools. However, this issue can be resolved if AMMs are widely used by people and businesses worldwide.