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
approved these changes
Mar 23, 2023
Collaborator
OneTrueKirk
left a comment
There was a problem hiding this comment.
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.
Joeysantoro
reviewed
Mar 31, 2023
| address account, | ||
| bool canExceedMax | ||
| ) internal { | ||
| canExceedMaxGauges[account] = canExceedMax; |
Contributor
There was a problem hiding this comment.
why is the contract check removed?
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DiffChecker with TribeDAO's implementation
Improve unit tests to reach 100% coverage
Audits: