President Elector

First Flight #24
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

Candidate[0] never wins a tie!

Summary

While the way tie works on the voting contract is a known issue ,it also means that whenever candidateList[0] goes to the final round and is tied with someone he will always lose whatever happens.

Vulnerability Details

Since the code sets the candidateList[0] as the default fewestVotesCandidate and it doesnt change if it is tied on the final round if tied the candidateList[0] will lose by default.

Impact

The way it is written it is unfair to that candidate .It would break trust with the service.

Tools Used

Manual/Foundry

Recommendations

Add emchanism in case two or more candidates have the same amount of votes as the fewestVotedCandidate,so that it chooses who to eliminate based on something else.

Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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