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 a Stablecoin Pool’s Formula Differ from the Constant Product Formula?
How Does an Automated Market Maker (AMM) Manage Liquidity in a Decentralized Exchange (DEX)?
What Is the Role of the ‘Constant Product Formula’?
What Role Does the “K” Constant Play in the Constant Product Market Maker Formula?
How Does the Constant Product Formula (X Y=k) Ensure Liquidity Is Always Available, Regardless of Trade Size?
How Does the ‘Constant Sum’ Formula Differ from the ‘Constant Product’ Formula in AMMs?
How Does an Automated Market Maker (AMM) Algorithm Maintain the Constant Product in a Liquidity Pool?
What Is the Primary Mathematical Formula Used by AMMs to Maintain Pool Balance?

Glossar