President Elector

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

MAX_CANDIDATES limit can be bypassed due to incorrect logic of computing candidates list

Summary

Generating the candidates list from s_rankings user inputs result in breaking the MAX_CANDIDATES limit.

Vulnerability Details

The candidates list s_candidateList is computed from the user input s_rankings. Each user giving diffrent address for candidates ranking leads to bypassing MAX_CANDIDATES = 10 limit

Impact

Bypass max number of candidates. Larger number of candidates leads to disparency in election.

Tools Used

Manula review

Recommendations

implement a function to register candidates and validate user input in rankCandidates(address[]) to ensure no invalid candidates address. Helps to reduce gas also

Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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