-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: swapExactAmountOut happyPath #19
Conversation
test/unit/BPool.t.sol
Outdated
// internal calculation for calcInGivenOut | ||
uint256 _weightRatio = bdiv(_fuzz.tokenOutDenorm, _fuzz.tokenInDenorm); | ||
uint256 _diff = bsub(_fuzz.tokenOutBalance, _fuzz.tokenAmountOut); | ||
uint256 _y = bdiv(_fuzz.tokenOutBalance, _diff); | ||
uint256 _foo = bpow(_y, _weightRatio); | ||
vm.assume(bsub(_foo, BONE) < type(uint256).max / _fuzz.tokenInBalance); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why create _assumeCalcSpotPrice
but not a method for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wow, looks like quite a long happy path 🥇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gaining momentum 👏
Closes BAL-33