-
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
feat: adding btt test for joinswap extern amount in #164
Conversation
├── it emits LOG_CALL event | ||
├── it sets the reentrancy lock | ||
├── it emits LOG_JOIN event for token | ||
├── it calls _pullUnderlying for token | ||
├── it mints the pool shares | ||
├── it sends pool shares to caller | ||
└── it clears the reentrancy lock |
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.
queries token in balance? i feel we're forgetting it everywhere
uint256 public totalWeight = 10e18; | ||
uint256 public tokenInBalance = 50e18; | ||
|
||
// (((tokenAmountIn*(1-(1-tokenInWeight/totalWeight)*MIN_FEE)+tokenInBalance)/tokenInBalance)^(tokenInWeight/totalWeight))*INIT_POOL_SUPPLY - INIT_POOL_SUPPLY |
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.
can we reduce this formula to what's described in BMath? like, using wi
or wT
instead of full variable names, perhaps we can do this accross all tests
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.
we could, but for that we could reference bmath directly. In these comments I explicitly implement the formulae as defined by bmath in a notation that's easily executable, using the same variable names that'll be found in the code, as both a sanity check and the way to independently compute them (this one got me searching for alternatives tobc
tho, because of the non-integer exponent)
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.
👍
No description provided.