This is the first mini end-to-end CPMM exercise.
Implement protected_swap_output.
min_out.With:
x = 1000
y = 2000
x_in = 100
min_out = 180You should:
100 to 99new_x = 1099181181 >= 180Round down during division. Conservative rounding is safer for AMM math.