Erik Weijers, 5 months ago
Impermanent loss means something like unrealized loss. It is the risk caused by price fluctuations between two coins in a liquidity pool on a decentralized exchange. The unrealized loss becomes realized the moment you withdraw your capital from the pool.
Some users of decentralized exchanges choose to 'farm' yield by putting their money in liquidity pools. Liquidity pools are the foundation of Decentralized Finance (DeFi). Anyone can deposit their crypto in these pools, becoming a so-called liquidity provider and creating liquid marketplaces for loans and trading. In return, they get trading fees. Liquidity pools are the DeFi version of orderbooks that are kept by traditional exchanges.
To make trading possible (for example stablecoin pair USDC/USDT) we need so-called trading pairs. A pool of these coins is the place where any user can put their coins into. Why? To earn yield. Suppose I don't plan to sell my USDC for now but want some passive income. Instead of simply holding my USDCs, I put them into a liquidity pool. For example, in a pool where people can trade USDC with another stablecoin, say USDT. In this example, I won't run much risk of impermanent loss. The reason being that two stablecoins won't vary much in price.
The risk of impermanent loss becomes higher if one or both coins in the liquidity pool are highly volatile. The underlying structure of liquidity pools explains this. Most pools determine the price of each coin by keeping the product of the price of the two coins constant:
Coin A x Coin B = constant
This means that if someone buys coin A from the pool with Coin B, the price of Coin A will rise a bit and that of Coin B will fall. Thus, the product remains constant. The adjustment is done automatically.
For example, what would happen to the liquidity pool of ETH and USDC if ETH rises sharply in value? In that case ETH must be sold for USDC to keep the ratio. If you later withdraw your ETH and USDC from the pool, in this example you will get back fewer ETH and more USDC than you had put in. You did make a profit, partly because of the interest. But you could have profited more from ETH's price rise had you not put your ETH into the pool to begin with.
Numerous dexes have implemented solutions that help liquidity providers mitigate the risk of impermanent loss. Concentrated liquidity was introduced by Uniswap v3. It allows liquidity providers to limit their liquidity to a certain price range for a trading pair (for example: ETH-USDC between 1500 and 1600 USDC per ETH). It allows them to deploy refined strategies as opposed to just dumping their coins in a pool and hoping for the best.