Impermanent Loss

HODL Value vs Liquidity Provision Value

Overview

Impermanent loss refers to a temporary unrealized loss of capital value that arises when providing liquidity to AMM protocols. In its simplest form, impermanent loss is the difference in value between holding your assets versus utilizing the assets to market make and earn yield. Impermanent loss occurs due to the fact that liquidity pool token ratios are constantly changing according to trades against it.

In AMM DEXs, LPs contribute funds to a liquidity pool, which allows users to buy and sell a particular asset on a decentralized exchange (DEX). The liquidity provider earns a share of the trading fees generated by the DEX in return for their contribution. However, the value of the assets in the liquidity pool can fluctuate over time, which naturally results in buying/selling activity in the pool, changing the original balance of liquidity provided.

As a result, the total value of the capital that the LP holds in the pool could decrease relative to the potential total value of the capital had they held their assets and chosen not to participate in the liquidity pool in the first place, and this temporary reduction of capital is known as Impermanent Loss.

It is important to note that impermanent loss is not a guaranteed outcome and can be mitigated through proper risk management strategies, such as diversifying the assets in the liquidity pool or rebalancing the pool regularly. Additionally, some DeFi protocols offer mechanisms to compensate liquidity providers for impermanent loss, such as Yield Farming rewards.

Decentralized exchanges

For a more in-depth understanding of AMM concepts, please refer to Decentralized Exchange (DEX) or Automated Market Maker DEX.

Example

For ease of understanding, the example below builds upon the AMM example. It is highly recommended that you read through the AMM example section first to understand how liquidity pools handles trades as well as liquidity additions/removals. Having knowledge of the above will make understanding impermanent loss much easier.

  1. Assume there is an existing 50:50 ETH/USDT pool with the following amount of tokens:

Liquidity Pool ETH amountUSDT amountConstant

ETH/USDT

100

200,000

20,000,000

  1. The LP decides to add 5 ETH and the corresponding amount of 10,000 USDT (i.e. 1 ETH = 2,000 USDT). With this addition, the LP owns 4.76% of the pool's liquidity (5/105 or 10,000/210000). The ETH/USDT pool changes as follows:

Liquidity Pool ETH amountUSDT amountConstant

ETH/USDT

105

210,000

22,050,000

  1. Following the LP's liquidity contribution, a trader buys 5 ETH from the pool. Using our constant product formula, the trader sends 10,500 USDT to the pool in exchange for the 5 ETH. This swap results in the pool balance below:

Liquidity Pool ETH amountUSDT amountConstant

ETH/USDT

100

220,500

22,050,000

  1. As the pool ratio has changed due to the trade, we can then compare the total value of the LP's position (4.76% of pool per step 2) before and after the trade.

PositionETH amountUSDT amountUSD value

Before (1ETH:2,000USDT)

5

10,000

20,000.00

After (1ETH:2,205USDT)

4.76

10,500

20,995.80

  1. To see the impermanent loss, we will have to compare the value after the trade to the value of the position if the LP had just held on to the initial 5 ETH and 10,000 USDT. Notice that if the LP had just held onto both tokens, the total value of his tokens would be 29.2 USD more (21,025.00-20,995.80) than if his tokens were provided to the liquidity pool. This 29.2 USD is what is known as impermanent loss.

PositionETH amountUSDT amountUSD value

Before (1ETH:2,000USDT)

5

10,000

20,000.00

After (1ETH:2,205USDT)

4.76

10,500

20,995.80

Hold (1ETH:2,205USDT)

5

10,000

21,025.00

Why provide liquidity then?

If every trade results in impermanent loss for the LP, why then would LPs be incentivized to take on the impermanent loss risks given the nominal fees? The answer to this lies in the fact that liquidity pools do not exist in isolation as there are many external exchanges, each with their own token pair price. If the pool price rises above the market price, arbitrage opportunities will result in the rebalancing of the pool and vice versa. Through this rebalancing, LPs earn fees from both the initial trade as well as the arbitrage trade.

In effect, arbitrageurs are a critical component of the AMM design ensuring that the pool always rebalances itself. It is this period between pool rebalancing which results in such losses being termed "impermanent". If the pool returns back to the initial ratio, LPs will be able to withdraw the same amount of tokens added with the additional fees accrued from providing liquidity.

Nevertheless, this impermanent loss risk can become permanent if token pair valuations diverge significantly from each other and never reapproaches the initial ratio when liquidity was added. This is more likely to happen for less correlated token pairs and hence higher trading fees are required in order to offset the impermanent loss risks. This is the reason why pool trading fees tends to be in line with token correlation.

Impermanent loss mitigation

To minimize impermanent loss risks, KyberSwap has implemented the following features:

Last updated