Skip to main content

What Is the Formula Used by a Constant Product AMM (E.g. Uniswap V2)?

The constant product formula is $x y = k$, where $x$ and $y$ are the quantities of the two tokens in the pool, and $k$ is a constant. This formula ensures that the product of the reserves remains unchanged after a trade, meaning that as one token is bought, the price of the remaining token increases, maintaining a balance and providing continuous liquidity.

How Does the Constant Product Formula (X Y=k) Govern AMMs?
How Does a Constant Product Formula (X Y=k) Govern the Price in a DEX Smart Contract?
How Does the Constant Product Formula (X Y=k) Govern an LP?
Explain the Difference between a Constant Product and a Constant Sum AMM Curve