How Does the Constant Product Formula (X Y = K) Relate to Impermanent Loss?
The constant product formula dictates that the product of the quantities of the two tokens (x and y) must remain constant (k). When the price of one token changes externally, the formula forces the ratio of x to y in the pool to change to maintain k.
This necessary rebalancing, driven by arbitrage, means the liquidity provider ends up with more of the depreciated asset and less of the appreciated asset compared to a simple hold strategy.