Skip to main content

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

The constant product formula, x y=k, is the core mechanism of many Automated Market Makers (AMMs), where 'x' and 'y' are the quantities of the two assets in the pool, and 'k' is a constant. This formula dictates that the product of the two reserves must remain the same before and after a trade.

When the external market price of one token changes, arbitrageurs trade with the pool until the pool's ratio matches the new external price. Impermanent loss arises because this rebalancing requires the pool to hold more of the token that has fallen in price and less of the token that has risen.

How Does an Automated Market Maker (AMM) Algorithm Maintain the Constant Product in a Liquidity Pool?
Explain the Difference between an Order Book Model and a Constant Product Formula Model for Liquidity
How Does a Stablecoin Pool’s Formula Differ from the Constant Product Formula?
How Does the Constant Product Formula X Y = K Mathematically Dictate the Price in a Liquidity Pool?