Skip to content
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

QA Report #83

Open
code423n4 opened this issue Apr 27, 2022 · 1 comment
Open

QA Report #83

code423n4 opened this issue Apr 27, 2022 · 1 comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue

Comments

@code423n4
Copy link
Contributor

N-01: Check newMax and oldMax values in setMaxDelegates function of ERC20MultiVotes.sol

Description

In the setMaxDelegates function for ERC20MultiVotes.sol, if newMax is less than oldMax there might be some accounts with more delegates than what the new maxDelegates value allows.

Adding the condition newMax >= oldMax would fix this issue.

N-02: Cannot set canContractExceedMaxDelegates to false in setContractExceedMaxDelegates function of ERC20MultiVotes.sol

Description

If the canExceedMax argument is set to false, the function canContractExceedMaxDelegates will revert not allowing an authorized admin to revoke the ability for an account to exceed the max delegates allowed.

Removing the canExceedMax from the condition in the function should allow canContractExceedMaxDelegates to be set to false.

@code423n4 code423n4 added bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels Apr 27, 2022
code423n4 added a commit that referenced this issue Apr 27, 2022
@Joeysantoro Joeysantoro added the sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue label May 13, 2022
@Joeysantoro
Copy link
Collaborator

N02 won't revert if false. https://github.com/fei-protocol/flywheel-v2/blob/main/src/token/ERC20MultiVotes.sol#L123 can only revert if the arg is true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Projects
None yet
Development

No branches or pull requests

2 participants