Impermanent loss: what it is, why it occurs, and how to reduce it
With the emergence of DeFi applications, investors have faced new risks, one of which is Impermanent Loss (impermanent losses).
What is impermanent loss?
Impermanent Loss (IL), or impermanent losses, refers to the costs incurred by liquidity providers in the pools of Automated Market Maker (AMM)* protocols.
* Automated Market Maker (AMM) — a type of DeFi protocol that allows users to exchange crypto assets without a traditional order book or the need to find a matching seller or buyer. Liquidity pools execute swaps, and an algorithm determines the value and ratio of assets within them. Liquidity for AMMs is provided by users themselves, who receive a portion of the fees generated from swaps in return.
Impermanent losses, or losses, are the difference between the value of tokens deposited in an AMM protocol's liquidity pool* and the value of the same tokens if their owner had held them in their wallet.
* Liquidity Pool — a collection of crypto assets locked in a DeFi protocol's smart contract and used to facilitate swaps and other operations. Assets are typically deposited into liquidity pools by liquidity providers (LPs), who receive a portion of the fees generated by transactions involving the assets they provide.
The term "impermanent loss" applies only as long as the investor's assets remain in the liquidity pool. If the token price ratio eventually returns to its initial level, impermanent losses may disappear.
However, if a liquidity provider withdraws assets from the liquidity pool before the token price ratio recovers, the impermanent loss becomes realized and turns into an actual loss. Thus, the final amount of impermanent loss is determined at the time the assets are withdrawn from the pool.
Why does impermanent loss occur?
Impermanent losses in DeFi protocols arise from the combined effect of two factors:
- Volatility, meaning significant fluctuations in cryptocurrency prices;
- The mechanics of liquidity pools in AMM protocols.
Liquidity pools in traditional AMM protocols automatically rebalance when the market prices of crypto assets change. As a result, the quantities of tokens are redistributed both within the pool itself and in the open positions held by liquidity providers.
To understand how impermanent losses arise, it is necessary to understand how traditional liquidity pools work. For example, traditional AMM protocols such as Uniswap use the formula x * y = k, where:
- x and y are the amounts of tokens;
- k is a constant.
Note: the mechanics of liquidity pools may differ from the traditional model across different AMM protocols. More detailed information can be found in the documentation of the specific protocol.
For example, a liquidity provider deposits 1 BTC and 80,000 USDT into a liquidity pool. The total value of the assets in the liquidity pool is $160,000 (assuming a BTC price of $80,000). If the price of Bitcoin doubles, the ratio of assets in the pool will change because arbitrage traders will buy BTC from the pool until its price in the pool matches the market price. At the same time, the AMM maintains the required reserve ratio according to the constant product formula xy=k. The pool is rebalanced, and the asset ratio will be approximately as follows: 0.7 BTC and 112,800 USDT. The total value of the liquidity provider's position will then be 112,000 + 112,800 = ~$224,800.
If the liquidity provider had simply held 1 BTC and 80,000 USDT, the total value of their investment after Bitcoin's price doubled would be $240,000.
The difference between this amount and the value of the tokens deposited in the pool is the impermanent loss: $240,000 - $224,800 = $15,200. If the liquidity provider withdraws the assets from the liquidity pool at this point, the $15,200 becomes a permanent, realized loss for the provider.
However, the Impermanent Loss mechanism works in both directions, meaning that losses incurred by liquidity providers who deposited their tokens into pools will be smaller compared with the losses of investors who simply hold their assets in a wallet.
The level of Impermanent Loss is also affected by the price correlation between assets: if their prices move in the same direction and at approximately the same or only slightly different rates, impermanent losses will be minimal. In some cases, providing liquidity may even outperform simply holding the assets due to the additional income generated by pool fees.
Is it possible to prevent impermanent loss?
It is impossible to avoid impermanent losses if at least one token in the pool is a volatile asset whose price can change by tens of percent over a short period.
Updates to protocols and their liquidity pools, such as Uniswap V3, have partially addressed the problem of impermanent losses, although they are effective primarily with active management rather than passive position holding.
However, there are other approaches as well. Pools containing stablecoins can provide protection against impermanent losses, since their prices rarely deviate from the US dollar exchange rate and usually only by small amounts (except in cases where a stablecoin loses its peg to the corresponding currency).
Stablecoin pools generate returns in the form of fees, which on average range from 1% to 4% and rarely exceed 10% per year. However, there is still a risk that a stablecoin may lose its peg to the US dollar or another currency to which its value is tied.
Another alternative for reducing impermanent losses is to choose pairs of highly correlated assets. For example, some major altcoins may have a strong price correlation with the leading altcoin, Ethereum (ETH). The level of correlation between crypto assets can be determined using specialized tools and indicators, such as the Correlation Coefficient* in TradingView.
* Correlation Coefficient — a statistical measure used to assess the strength and direction of the relationship between changes in the prices of two assets. The coefficient ranges from −1 to +1. A value close to +1 indicates a strong positive correlation, meaning that the prices of the assets generally move in the same direction. A value close to −1 indicates a strong negative correlation, meaning that the prices tend to move in opposite directions. A value close to 0 indicates the absence of a pronounced linear relationship.
There is another option that can help reduce impermanent losses — diversification. If only a portion of the assets is deposited into an AMM protocol while the rest is simply held in a wallet, impermanent losses will affect only the portion of capital held in the liquidity pool. Thus, if cryptocurrency prices rise, the impact of impermanent loss on the total value of the portfolio will be smaller.
