Skip to main content

How Does the Constant Product Formula ($x Y = K$) of a Basic AMM Determine Price and Spread?

The formula $x y = k$ ensures that the product of the quantities of the two tokens in the pool ($x$ and $y$) remains constant ($k$). The price is determined by the ratio of the two tokens ($y/x$).

When a trade occurs, the ratio changes, and the new price is the effective execution price. The bid-offer spread arises from the price impact and the transaction fees charged by the pool on every trade.

How Does the Concept of Slippage Relate to the Size of the Constant Product (K) in an AMM Pool?
Explain the Concept of “Price Impact” on a Decentralized Exchange (DEX)
How Does a Constant Product Formula (X Y=k) Govern the Price in a DEX Smart Contract?
How Does EIP-1559 Affect Gas Fee Calculation?