How Does the Constant Product Formula (X Y = K) Relate to Impermanent Loss?

The constant product formula, x y = k, dictates the relationship between the quantities of the two tokens (x and y) in the pool, where k is a constant. When the external price of one token changes, arbitrageurs trade with the pool to maintain the price equilibrium.

To keep k constant, a change in x must be accompanied by a proportional, inverse change in y. This forced rebalancing to maintain the invariant k is precisely what causes the liquidity provider's asset value to diverge from the HODL value, resulting in impermanent loss.

What Happens to the Stableswap Invariant If One of the Stablecoins Loses Its Peg Significantly?
How Does the Constant Product Formula (X Y=k) Directly Lead to the Phenomenon of Impermanent Loss?
What Is the Fundamental Mechanism of an Automated Market Maker (AMM) That Causes Impermanent Loss?
What Are the Advantages and Disadvantages of Using a Constant Sum Formula versus a Constant Product Formula in an AMM?
How Is the Invariant Formula for a Multi-Asset Pool, like Balancer’s Value Function, Different from the Constant Product Formula?
How Would This Formula Change for a Liquidity Pool Governed by a Constant Mean or Constant Sum Formula?
What Is the Constant Product Formula (X Y=k) and How Does It Relate to Impermanent Loss?
How Does the ‘Constant Sum’ Formula Differ from the ‘Constant Product’ Formula in AMMs?

Glossar