How Does the Constant Product Formula (X Y=k) Govern an LP?
The formula x y=k, where x and y are the quantities of the two tokens in the pool and k is a constant, ensures that the pool's total liquidity remains the same after a trade. This formula dictates the exchange rate between the two tokens: as one token is bought, its supply decreases, driving its price up relative to the other token.