What Is the Constant Product Formula (X Y=k) and How Does It Cause Impermanent Loss?

The formula x times y equals k ensures that the product of the quantities of the two tokens (x and y) remains constant (k). When an external price change makes the ratio x/y in the pool incorrect, arbitrageurs step in.

They trade with the pool until the pool's ratio matches the external market price. This trade changes the quantities x and y, but k stays the same.

The loss arises because the value of the assets inside the pool after the trade is less than the value if the assets were simply held (HODLed).

How Would This Formula Change for a Liquidity Pool Governed by a Constant Mean or Constant Sum Formula?
How Does the ‘Open Interest’ in a Futures Contract Indicate Market Sentiment?
How Do Different AMM Formulas, like Constant Sum, Affect the Severity of Impermanent Loss?
How Does the Concept of “Divergence Loss” Relate to Impermanent Loss?
Can Impermanent Loss Be Positive, Resulting in an Impermanent Gain?
How Does the Constant Product Formula (X Y=k) Directly Lead to the Phenomenon of Impermanent Loss?
How Does a Stablecoin Pool’s Formula Differ from the Constant Product Formula?
How Does the ‘Constant Sum’ Formula Differ from the ‘Constant Product’ Formula in AMMs?

Glossar