mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-05-19 15:39:28 +00:00
Adds SwapExactOutput to the AMM, allowing callers to specify the exact desired output amount while the protocol computes the required input (ceiling division to prevent rounding in the protocol's favour). The swap-exact-output success tests now use a dedicated small-pool fixture (reserve_a=1_000, reserve_b=500) rather than the shared pool_definition_init, which had its reserves bumped to 5_000/2_500 in a later commit to satisfy the MINIMUM_LIQUIDITY invariant introduced for new_definition. Using a dedicated fixture keeps each test self-contained and avoids hardcoded expected values silently breaking when shared baselines change.