Skip to main content

How Does an Automated Market Maker (AMM) Calculate Price Based on Liquidity?

An AMM uses a mathematical formula, most commonly the constant product formula (x y = k), where 'x' and 'y' are the quantities of the two tokens in the pool and 'k' is a constant. The ratio of the tokens in the pool determines the current price.

When a trade occurs, the balance of 'x' and 'y' shifts. In a low-liquidity pool, even a small trade causes a large shift in the ratio, resulting in a significant price change, which is the mechanism of price manipulation.

In the Context of This Formula, What Role Does Arbitrage Play in Enforcing the Price Ratio ‘K’?
How Does an Automated Market Maker (AMM) Calculate the Price of a Token Pair in a Liquidity Pool?
How Does a Stablecoin Pool’s Formula Differ from the Constant Product Formula?
How Would This Formula Change for a Liquidity Pool Governed by a Constant Mean or Constant Sum Formula?