A voter can rank the same candidate multiple times, thus manipulating the voting process.
There is no validation to prevent a voter from ranking the same candidate in multiple positions in their ordered list, giving a single candidate an unfair advantage.
Malicious voters can skew election results by ranking the same candidate multiple times, which undermines the fairness of the ranked-choice voting process.
Foundry
To ensure that each candidate is ranked only once per voter in the _rankCandidates
function, we can add a check to see if any candidate is duplicated within the orderedCandidates
array. This can be done by using a temporary mapping(address => bool)
inside the function to track if a candidate has already been ranked by the voter.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.