-
Notifications
You must be signed in to change notification settings - Fork 15
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/price update over time #203
Conversation
Feat/price update over time
🚨 Report Summary
For more details view the full report in OpenZeppelin Code Inspector |
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.
Looks good to me - just left 3 minor comments
// Check for price jump or drawdown | ||
if ( | ||
// Check if the changePerBlock is too large | ||
changePerBlock > lastPrice.mulDivDown(1e18 + limit.jump, 1e18) |
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.
I wonder if this check is effective given that the owner can change limits instantly
changePerBlock > lastPrice.mulDivDown(1e18 + limit.jump, 1e18) | ||
) { | ||
// Pause the vault if it is not already paused | ||
if (!Pausable(priceUpdate.vault).paused()) { |
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.
Let's use the pause
cached above. Also, should we check the vault is not paused at all before updating?
uint256 y = 100e18; | ||
uint256 z = 100e18; | ||
console2.log(x.mulDivUp(y, z)); | ||
emit LogBytes( |
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.
Out of scope?
No description provided.