-
Notifications
You must be signed in to change notification settings - Fork 11
Erc20Gauges #201
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
base: feat/core-coreref-cleanup
Are you sure you want to change the base?
Erc20Gauges #201
Conversation
[G-02] Use prefix not postfix in loops [G-04] Use != 0 instead of > 0
Fixes the following issues from C4 audit: [M-03] ERC20Gauges: The _incrementGaugeWeight function does not check the gauge parameter enough, so the user may lose rewards [M-04] In ERC20Gauges, contribution to total weight is double-counted when incrementGauge is called before addGauge for a given gauge.
The amount of freed weight was unnecessarily high if freeing weight from deprecated gauges Issue from Code4rena 2022-04 audit: [M-07] Incorrect accounting of free weight in _decrementWeightUntilFree
OneTrueKirk
left a comment
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.
Thank you for breaking down the commits per issue or code arena feedback point, it made it a lot easier to follow the significance of the changes.
| address account, | ||
| bool canExceedMax | ||
| ) internal { | ||
| canExceedMaxGauges[account] = canExceedMax; |
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 is the contract check removed?
DiffChecker with TribeDAO's implementation
Improve unit tests to reach 100% coverage
Audits: