-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: more features in new stateful test
* the amount of liquidity with which pools are seeded is now bigger, since it doesn't make sense to test pools with shallow liquidity (newton_y math breaks). * added two new invariants `can_always_withdraw` and `newton_y_converges` that make sure the maths of the pool are not broken. The former attemps to withdraw all available liquidity (this verifies newton_D always works), the latter attemps to call get_y with an amount that could fail when the pool is severely unbalanced. * the `add_liquidity` function now adds the depositor to a list and sanity checks make sure we don't store the address of depositor who actually does not have a deposit (useful for withdrawals in the future). * `exchange` method now works and performs assertion to make sure swaps are correct. * up_only_profit now also updates the state machine about `xcp_profit` and `xcp_profit_a`
- Loading branch information
1 parent
866e545
commit ca40664
Showing
1 changed file
with
74 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters