Restore max gamma to MAX_GAMMA_SMALL 0.02 (as before) and even allow to go as far as MAX_GAMMA 0.199 with some more restrictive checks on convergence.
newton_D convergence limits are now symmetric.
Removal of xcp_oracle due to low usage and gas consumption.
More precise ramping condition (before there was some delay before you could start a new ramp).
Testing
Stateful testing was previously inefficient and broken, has been rebuilt from the ground up:
strategies.py now contains a collection of SearchStrategy that can be used for stateful testing (and fuzzing) instead of fixtures, to unlock all the hypothesis features (like statistics and shrinking) that were previously unavailable with injected pytest fixtures.
every single aspect of a pool is fuzzed, from the parameters to the fee receiver, from the decimals of the tokens to the moving average time window.
constants have been centralized in a single python file that is now used by all tests. Previously each file had its own constants reducing readbility.
bumped boa version
ci now has a separate job for stateful testing to avoid hitting the 6 hours limit.
moved fuzz_multicoin_curve (now simulator.py) to utils since it's not a proper test, but rather a simulation helper to find bounds. Lots of dead code has been removed.
more unit tests for ramping edge cases have been added (increase coverage).
minor changes in test (removed unused parts, better documentation).
Features implemented
MAX_GAMMA_SMALL
0.02 (as before) and even allow to go as far asMAX_GAMMA
0.199 with some more restrictive checks on convergence.newton_D
convergence limits are now symmetric.Testing
strategies.py
now contains a collection ofSearchStrategy
that can be used for stateful testing (and fuzzing) instead of fixtures, to unlock all the hypothesis features (like statistics and shrinking) that were previously unavailable with injected pytest fixtures.fuzz_multicoin_curve
(nowsimulator.py
) toutils
since it's not a proper test, but rather a simulation helper to find bounds. Lots of dead code has been removed.