Open dpaiton opened 3 weeks ago
possibly related:
fuzz_calculate_max_short
is failing with large differences in budget amount: https://github.com/delvtech/hyperdrive-rs/issues/121
This is happening rarely, but I believe that is because the test itself is rarely hitting the assert. I rewrote the test to always hit the assert and it fails much more often.
Fuzz testing is seeing the following errors:
calculate_max_long
InsufficientLiquidity: Negative Interest
Initial guess in calculate_max_long is insolvent
target share reserves less than effective share reserves
calculate_max_short
absolute_max_short is insolvent
arithmetic operation overflow
The fuzz pool is initialized to a known-good state (@slundqui is 80% certain it is good based on visual inspection of the parameters from himself, Jonny, & Alex and comparison against rust CI tests). Random bots make trades and call
calc_max_long
andcalc_max_short
at random times throughout.