Skip to content

Conversation

@eswak
Copy link
Collaborator

@eswak eswak commented Mar 22, 2023

DiffChecker with TribeDAO's implementation

Improve unit tests to reach 100% coverage

Audits:

eswak added 7 commits March 17, 2023 16:41
[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
Copy link
Collaborator

@OneTrueKirk OneTrueKirk left a 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;
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants