-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add additional tests regarding issues from the Trail of Bits audit of…
… Balancer (#506) * Check that pool_join-pool_exit is safe * Verify that minimum/maximum weights are respected * Check that total weight does not exceed maximum * Check that all pool join/exit's raise on zero `util::pool` raises if either `pool_amount` or `asset_amount` is zero. This is an unfortunate result of the abstraction of `pool_join` and `pool_exit` into `util::pool`, but it does protect the user from paying for something they get nothing for. The other four functions only raise an error if what the joining/exiting user pays is zero. So this protects the LPs, but not the interacting user.
- Loading branch information
1 parent
8857318
commit 729be75
Showing
3 changed files
with
142 additions
and
2 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
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
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