How Does the Ratio of X and Y in the Formula Determine the Price of One Token in Terms of the Other?
In the x y=k formula, the instantaneous price of token X in terms of token Y is determined by the ratio of the reserves, specifically the ratio of Y to X (y/x). Conversely, the price of Y in terms of X is x/y.
This ratio represents the marginal rate of exchange. When a trader buys X, they reduce the Y reserve and increase the X reserve, causing the ratio y/x to decrease, which means the price of X in terms of Y goes up for the next trader.