Impermanent Loss

What Is Impermanent Loss

Impermanent loss is a concept that occurs when you provide liquidity to an automated market maker (AMM) and the prices of the tokens in the pool diverge in value compared to when you first deposited them. It's called "impermanent" because the loss only becomes permanent if you withdraw your liquidity while the prices have diverged; if the prices return to the same ratio as when you deposited, the loss disappears.

Automated Market Makers (AMMs)

In traditional finance, markets have "order books" where buyers and sellers place bids and asks. In contrast, AMMs replace the need for a traditional order book. Instead of matching buyers and sellers directly, AMMs rely on liquidity pools, where users provide liquidity by depositing pairs of tokens.

For example, in the Uniswap AMM model, a liquidity provider might deposit an equal value of two tokens (e.g., ETH and DAI) into a pool. The pool allows other users to swap between these tokens, using a mathematical formula to determine the price. One common formula is the constant product formula, where the product of the two token quantities remains constant:

x * y = k

Where:

  • x = amount of one token in the pool (e.g., ETH)

  • y = amount of the other token in the pool (e.g., DAI)

  • k = constant product

This ensures that as users swap tokens, the prices adjust based on the pool's liquidity.

How Impermanent Loss Happens

Impermanent loss occurs when the price of one or both tokens in the liquidity pool changes after you deposit them. Here’s an example to explain this:

  • Step 1: You provide 1 ETH and 1,000 DAI to a liquidity pool (assuming 1 ETH = 1,000 DAI at the time).

  • Step 2: If ETH increases in price to 1,500 DAI (ETH appreciates relative to DAI), arbitrage traders will buy ETH from the pool (since it’s cheaper than in other markets) and add DAI, rebalancing the pool.

  • Step 3: As a liquidity provider, you now have less ETH and more DAI in your share of the pool. If you withdraw at this moment, you’ll receive less than 1 ETH and more than 1,000 DAI.

Even though the total value of your tokens in the pool may have increased due to the price rise, the value of what you would have had by simply holding (HODLing) your 1 ETH and 1,000 DAI without providing liquidity is higher than your liquidity pool value. This difference is the impermanent loss.

Key Factors Influencing Impermanent Loss

  1. Price Divergence: The larger the price change between the tokens, the larger the impermanent loss.

  2. Liquidity Provider Fees: AMMs charge trading fees, which go to liquidity providers. These fees can offset impermanent loss if trading volume is high.

  3. Volatility: More volatile pairs tend to experience greater price divergence, leading to more impermanent loss.

  4. Time in the Pool: Impermanent loss becomes permanent only if you withdraw liquidity. If prices revert back to their original ratios, the loss disappears.

Why Impermanent Loss is "Impermanent"

  • If the price ratio of the tokens in the pool returns to the same level as when you deposited, your impermanent loss disappears.

  • Even if the price diverges, fees earned from trading activity in the pool may more than compensate for the impermanent loss.

Related content

There is no related content