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 #78

Closed
code423n4 opened this issue Apr 27, 2022 · 2 comments
Closed

QA Report #78

code423n4 opened this issue Apr 27, 2022 · 2 comments
Labels
bug Something isn't working invalid This doesn't seem right sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue

Comments

@code423n4
Copy link
Contributor

1. Wrong logic

https://github.com/fei-protocol/flywheel-v2/blob/77bfadf388db25cf5917d39cd9c0ad920f404aad/src/token/ERC20Gauges.sol#L461

Summary

As in the comment, "add and fail loud if zero address or already present and not deprecated".
It should be
'''

if (gauge == address(0) || !(newAdd && previouslyDeprecated)) 

'''
Insted of
'''

if (gauge == address(0) || !(newAdd || previouslyDeprecated)) 

'''

@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

The failure case for this clause should be where both newAdd and previouslyDeprecated are true. "A not new address must be not deprecated". all other cases should not fail.

Your proposed solution would fail in two undesirable cases, when one is true but not the other.

@Joeysantoro Joeysantoro mentioned this issue May 13, 2022
@0xean
Copy link
Collaborator

0xean commented May 20, 2022

closing as invalid.

@0xean 0xean closed this as completed May 20, 2022
@0xean 0xean added invalid This doesn't seem right and removed QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax labels May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working invalid This doesn't seem right sponsor disputed Sponsor cannot duplicate the issue, or otherwise disagrees this is an issue
Projects
None yet
Development

No branches or pull requests

3 participants