Spot price is not the same as execution price.
Implement execution_price_bps(x_in, y_out).
If a trader spends x_in units of X and receives y_out units of Y, then the average price in Y-per-X is:
y_out / x_inScale by 10_000 so the result stays in integer math:
y_out * 10_000 / x_inFor x_in = 100 and y_out = 181:
181 * 10_000 / 100 = 18_100