I'll say this upfront - Impermanent loss is 1 of the more complicated topics in all of Defi. IL is the temporary loss of funds while providing liquidity in defi.
Let's take for example a USDC/ETH pool on Uniswap.
You provide $500 of USDC at the price of $1 = 500 USDC
You provide $500 of ETH at a price of $2,000 = .25 ETH
Let's say the price of ETH goes up $2,500. If you had just help USDC and ETH, then the total value of your assets would have been $1,125. Because you providing them in a liquidity pool, arbitrage occurred on the DEX until the pool was at equilibrium. If you were to return your LP tokens to get your holdings back, you would now receive: 559.02 USDC and 0.22 ETH, now worth $1118.03 in total.
Your "loss" is 0.62%...which is calculated from what you would have made if you had just help the tokens instead of providing an LP position. The math here is kinda confusing, I usually just use 1 of the following calculators to predict what my IL will be: https://dailydefi.org/tools/impermanent-loss-calculator/
https://baller.netlify.app/ ← advanced calculator good for >2 asset liquidity pools.
Should you care about IL?
Short answer....it depends.
If you're providing liquidity to 2 tokens that are relatively stable and/or blue chip (BTC/ETH) IL isn't going to be that much of a factor. If we're in a bear market or even a crab market where price is going sideways, IL isn't really a factor.
For an example, let's say you provide 500 USDC at $1 and .25 of ETH at $2000. Then let's say ETH goes up to $5000.
If you had just held your tokens, you would have $1,750 (starting from $1,000). Because your provided liquidity, you would have $1,581.14 (starting from $1,000).
So a 250% increase in ETH price only caused a 9.65% IL. Something to also note is that Impermanent loss can be misleading. While we did "loss" money compared to just holding ETH, we still made $581.14 in our LP position. This also doesn't account for the swap fees for farm rewards that we could be receiving on our LP position. I think a good way to think of IL is the following mindset. When price goes up...and you have an active LP position where one side is a stablecoin, the pool automatically "takes profits" for you on the way up.
Going the other direction, let's say let's say you provide $500 USDC at $1 and .25 of ETH at $2000. Then let's say ETH goes down to $1000.
If you had just held your tokens, you would have $750 (starting from $1,000). 500 USDC and 0.25 ETH Because you provided liquidity, you would have $707.11 (starting from $1,000). 353.55 USDC and 0.35 ETH Your IL would be 5.72%
When price goes down, LP positions (with a stable) essentially buy the dip.
When IL does matter
I would be worried about IL if you're providing liquidity to tokens that fluctuate a LOT in value (small market cap coins) OR providing liquidity to two coins that move in different directions. When 1 coin goes up and 1 coin goes down...that's when IL can really add up.