What Is Impermanent Loss and How Do You Calculate It?
Gain clarity on impermanent loss in DeFi liquidity provision and understand the methods to quantify this financial metric.
Gain clarity on impermanent loss in DeFi liquidity provision and understand the methods to quantify this financial metric.
Impermanent loss is a financial characteristic in decentralized finance (DeFi) that impacts individuals who provide assets to liquidity pools. It describes a temporary difference in the value of assets held within a liquidity pool compared to simply holding those same assets in a personal wallet. Understanding this concept is relevant for anyone providing liquidity, as it signifies a potential opportunity cost tied to price fluctuations of the underlying assets.
Impermanent loss occurs when the market price of assets deposited into a liquidity pool changes relative to their price at the time of deposit. This divergence means the value of assets within the pool becomes less than if they had been held outside the pool. This dynamic is inherent to Automated Market Makers (AMMs), which power most decentralized exchanges (DEXs).
Liquidity pools are collections of funds locked in smart contracts, typically consisting of two different tokens, such as a cryptocurrency and a stablecoin. Users, known as liquidity providers (LPs), deposit an equal value of both assets into these pools. LPs typically earn a share of the trading fees generated by the pool.
The core mechanism behind AMMs relies on a mathematical formula, often expressed as x y = k. Here, ‘x’ and ‘y’ represent the quantities of the two tokens in the pool, and ‘k’ is a constant value. This formula ensures that there is always liquidity available for trading, as the price of one asset relative to the other is determined by their ratio within the pool.
When the market price of one asset in the pool changes significantly outside the AMM, an imbalance arises between the pool’s internal price and the external market price. This creates an arbitrage opportunity. Arbitrageurs will rebalance the pool by buying the cheaper asset and selling the more expensive one until the pool’s prices align with the broader market.
Consider a liquidity provider who deposits 1 ETH and 1,500 USDC into a pool, with ETH priced at $1,500. The initial deposit value is $3,000. If ETH rises to $3,000 in the wider market, arbitrageurs will buy the cheaper ETH from the pool using USDC. As ETH is bought, the amount of ETH in the pool decreases, and USDC increases. The liquidity provider now holds less ETH and more USDC than their initial deposit, though their total pool share value might still be higher.
This rebalancing means the liquidity provider holds a different proportion of assets than initially deposited, typically less of the appreciated asset and more of the stable one. Impermanent loss is the difference between the value of assets held in the pool and what they would be worth if simply held in a wallet. It is an opportunity cost because the LP would have had a higher dollar value by simply holding the assets. This loss is not necessarily an absolute monetary loss, especially if both assets appreciate, but rather a missed gain relative to a simple holding strategy.
The term “impermanent” signifies that the loss is initially unrealized and can diminish or disappear. This temporary status holds as long as assets remain within the liquidity pool. The loss only becomes “realized” or “permanent” if the liquidity provider withdraws assets while the price divergence still exists.
The loss can decrease or reverse if the prices of the pooled assets return to their original ratio, or a closer ratio, compared to when initially deposited. If an asset’s price reverts to its starting point, the impermanent loss would be mitigated. This narrows the relative price divergence, bringing the pool’s asset distribution closer to the initial deposit ratio.
Conversely, if the relative price divergence persists or widens, impermanent loss can become substantial. While the loss is not “permanent” until withdrawal, prolonged price movements can make it effectively realized if the LP exits the pool under those conditions. A liquidity provider’s timing for withdrawing assets significantly influences whether this potential loss is locked in.
This contrasts with a realized loss from traditional trading, where an asset is sold at a lower price than its purchase price, immediately crystallizing the loss. Impermanent loss remains a theoretical loss until the liquidity provider removes their capital from the pool. LPs typically earn trading fees, which can help offset any accrued impermanent loss.
Calculating impermanent loss involves comparing the current value of assets held in a liquidity pool to their value if held outside the pool. This quantifies the opportunity cost incurred by providing liquidity. The principle is to determine the difference between simply holding initial assets and actively participating in the liquidity pool, where asset quantities adjust due to price changes and arbitrage.
A simplified example illustrates this process. Imagine a liquidity provider deposits 1 ETH and 100 USDC into a pool, with ETH valued at $100.
The initial deposit is 1 ETH and 100 USDC. The total value at deposit is $100 (1 ETH) + $100 (100 USDC) = $200.
Suppose ETH increases to $200, while USDC remains stable at $1. If the LP had simply held their initial assets, their value would be $200 (1 ETH) + $100 (100 USDC) = $300.
Due to the price change, arbitrageurs rebalance the pool. The quantities of ETH and USDC in the pool adjust to reflect the new market price. For the LP’s initial deposit, if ETH’s price doubles to $200, their share in the pool would become approximately 0.707 ETH and 141.4 USDC. The value of these assets at the new market prices would be 0.707 ETH $200 + 141.4 USDC $1 = $141.4 + $141.4 = $282.8.
The impermanent loss is the difference between the value if held ($300) and the value in the pool ($282.8). In this instance, the impermanent loss is $300 – $282.8 = $17.2. This calculation helps LPs understand the potential opportunity cost associated with providing liquidity, highlighting that their total dollar value may be less than if they had simply held their initial assets.