Most AMM and liquidity pool uses the constant product formula which is x * y = k . This is the formula that mathematically determines what the market price of the token in the pool should be. x and y represents the respective token balance of a pairing and k is a constant that will never change.