When you provide liquidity to a pool, you enter it at a 1:1 ratio, but when price diverges, that ratio changes, meaning the amount of tokens you provided will change too. Watch the attached 2 minute video, "What is Impermanent Loss in DeFi?" to see a simple walk through of this example. To better understand how price divergence can cause impermanent loss, I'm going to break down Uniswap v1 and v2 AMM algorithm using our AAVE/ETH dual asset liquidity pool example from earlier.
Uniswap v1 and v2 liquidity pools use an X * Y = K algorithm, where K is a constant. X and Y represent your pooled tokens, K represents your LP tokens.
Using the AAVE/ETH Example from Earlier:
If I provide $500 of ETH and $500 AAVE to a liquidity pool contract, I will receive back $1000 in the amount of AAVE/ETH LP tokens relative to my percentage of the pool.
Applying the Liquidity Pool Algorithm:
ETH = X, AAVE = Y, AAVE/ETH LP Token = K
ETH + AAVE = AAVE/ETH LP TOKEN
If K is a constant, we know that if X moves in the pool, Y will move to balance out the ratio. Impermanent loss happens when price divergence and trading through the AMM forces the X * Y ratio to change, and the pool liquidity adjusts to maintain K; If the value of my ETH diverges from the value of my AAVE, the pool will adjust accordingly.
The real problem becomes when this chips away at token collateral, leaving me with less coins than I started out with. If price volatility is going to chip away at my tokens, I would have been better off holding the underlying ETH and AAVE on their own. This is what impermanent loss is.
There are many ways to earn farming rewards while avoiding impermanent loss, not all protocols and liquidity pools use the X * Y = K algorithm, but that is most often what we refer to when discussing impermanent loss.
At its baseline, price divergence between the assets in your liquidity pool is the reason for impermanent loss.
Dual asset liquidity pools (like AAVE/ETH) typically refer to LPs with a 50/50 asset split. These pools will have the highest level of IL when pairings are volatile, choosing two highly correlated assets⁶ that do not diverge in price will mitigate this. Simple choices of highly correlated assets would be stablecoin or wrapped asset pairings, such as USDC/USDT or WETH/ETH which remain in the same price peg.
Multi asset liquidity pools such as Curves tricrypto pool, made up of even parts ETH/WBTC/USDT, also mitigate IL to some degree by diversifying the impact. These pools are still subject to IL but a bit less than dual asset pools; there are also options for highly correlated pairings of multi asset pools, such as USDC/USDT/DAI.
Uneven or, weighted liquidity pools such as found on Balancer employ different asset ratios to cushion the blow of IL. Some pools offer 80/20 or 60/40 splits between assets in the pool, if the token occupying the mass of the pool experiences volatility, less IL is experienced. Inversely, if the token occupying the smaller part of the pool is volatile, the IL will be worse. A tactic to mitigate the impact is using bluechips or stablecoins in the smaller part of the asset pairings for uneven liquidity pools.
Learn more: Weighted Pools - Balancer, Balancer Docs
Single sided asset pools are the strongest way to mitigate impermanent loss when farming, a single sided asset pool only one token. For example, if a pool holds only USDC that is a single sided asset pool and is not subject to impermanent loss.
Track potential IL:
Calculate potential IL:
⁶Highly Correlated Assets are asset pairings that move together, avoiding price divergence.
DeFi is subject to risk, including risk related to smart contracts. Please practice due diligence. All 3rd party sites are provided for convenience only, if you choose to access any such site, you do so at your own risk.
These resources are intended for general guidance and educational purposes only. I am not an investment or financial advisor, and make no representation regarding the advisability of investing.
For convenience only, this website may provide links or pointers to third party sites. While all information is provided in good faith, I make no representations about any other websites that may be accessed from this website. If you choose to access any such sites, you do so at your own risk.
Decentralized Finance is subject to significant risk, including risk related to smart contracts.