impermanent loss
Impermanent loss is the quiet tax a liquidity provider pays for letting an automated market maker rebalance their assets. The pool's invariant forces it to always sell whichever asset is rising and buy whichever is falling, so an LP automatically ends up holding more of the loser and less of the winner than someone who simply held the two tokens in a wallet. The 'loss' is the shortfall between the value of your pool position and the value you would have had by just holding (HODLing) the original deposit. It is called impermanent because if the price ratio returns to where it started, the gap vanishes entirely; it only becomes a permanent loss when you withdraw while prices have diverged.
For a standard constant-product pool the loss depends only on how far the price ratio has moved, not on the path. If r is the new price divided by the deposit-time price, the loss relative to holding is 2*sqrt(r)/(1 + r) - 1. This is always less than or equal to zero and gets worse the more r departs from 1 in either direction. A 1.25x move costs about 0.6%, a 2x move about 5.7%, a 4x move about 20%, and a 5x move about 25.5%. The symmetry means a halving hurts as much as the corresponding doubling, since what matters is divergence, not direction.
Whether providing liquidity is actually profitable is a race between this divergence loss and the trading fees plus any incentive rewards the LP collects. In quiet, range-bound, high-volume pairs, fees can comfortably outrun impermanent loss; in trending or volatile markets, especially for volatile-versus-stable pairs, the loss can swamp the fees and leave the LP worse off than holding. This is why like-valued pairs (stablecoin-to-stablecoin, or a token versus its wrapped version) are popular: their price ratio barely moves, so impermanent loss is tiny and the fees are nearly pure profit.
Impermanent loss as a function only of the price ratio r in a constant-product pool.
Impermanent loss is not a fee paid to anyone — it is an opportunity cost captured mostly by arbitrageurs, who trade the pool back to the market price and pocket the difference. From the LP's view it is the structural cost of providing two-sided liquidity to anyone who wants it.