The RankedChoice contract implements a ranked choice voting system but lacks a dedicated record to keep track of tallied ranks. This oversight could potentially lead to issues in verifying the accuracy and completeness of vote counting.
The contract stores vote counts in a mapping (s_candidateVotesByRound) but lacks a corresponding record for tallied ranks.
Rankings submitted by voters are stored in another mapping (s_rankings).
The contract iterates through rankings to count votes, but doesn't maintain a comprehensive log of counted ranks.
Without a dedicated record, it's challenging to verify that all votes have been accurately counted.
There's no clear way to detect if a rank has been counted twice within a round.
It's difficult to reconstruct the voting history or verify the integrity of the tallying process.
Identifying issues during elections becomes more complex due to the lack of comprehensive logging.
Manual Review
To address this issue, the following actions are recommended:
Implement events to log vote counting progress, including candidate names, voter addresses, and round numbers.
Create a separate mapping to keep track of tallied ranks, indexed by candidate address, vote number, and round ID.
Add unique identifiers for each vote/rank combination to allow for easy tracking and verification.
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.