Why it happens
A constant-product pool keeps the product of its two reserves fixed. When the market price moves, traders buy the cheaper token from the pool until its price matches, so the pool ends up holding more of the token that fell and less of the one that rose.[1]
The formula
For a 50/50 constant-product pool such as Uniswap v2: impermanent loss = 2 * sqrt(r) / (1 + r) - 1, where r is the new price divided by the price at deposit.[1]
Worked example
If ETH doubles against USDC, r = 2. Then 2 * sqrt(2) / 3 - 1 = 2.828 / 3 - 1 = -0.057, so the position is worth about 5.7% less than holding. A halving (r = 0.5) gives the same 5.7%.[1]
Why it is called impermanent
If the price returns to the ratio at deposit, the loss disappears. It becomes permanent when you withdraw while the price is different.[1]
The Bottom Line
Providing liquidity pays trading fees but costs you value when prices diverge. Compare expected fees with the loss for the price moves you expect.
Educational content, not financial advice.