A CPMM does not store a price directly. The current spot price is implied by the reserve ratio.
Implement spot_price_bps(x_reserve, y_reserve).
10_000 so you can stay in integer math.x = 2_000 and y = 3_000, return 15_000.That corresponds to:
3_000 / 2_000 = 1.5
1.5 * 10_000 = 15_000Do multiplication before division when possible, or integer division will throw away precision too early.