Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

A voter is always counted to the "for" list regardless of his vote input

Summary

When a voter calls "function vote" with a provided parameter for "voteInput", he will be counted to the "for" list even if he voted "against"

Vulnerability Details

In the function "vote" there is an "if" statement that is supposed to separate the "for" and "against" voters and push their address to the respected list, however this fails since the "if" statement only checks if the caller has provided a "voteInput", not what is that input. So even if a voter has voted against his address will still be added to "s_votersFor".

Impact

Unfair voting since the outcome of every vote will be "for".

Tools Used

Manual review

Recommendations

Change the current "if" statement or add a new one that checks if the "voteInput" is for or against.

Updates

Lead Judging Commences

0xnevi Lead Judge
over 1 year ago
0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.