The RankedChoice contract does not enforce any time restriction on when voters can submit their candidate rankings. This omission allows users to vote at any time, including long after the election period has ended, which could lead to invalid or manipulated election outcomes.
The vulnerability arises from the absence of a clear voting window mechanism. Voters can submit their votes through the rankCandidates and rankCandidatesBySig functions at any time, even after the election has ended. Without restricting the voting period:
Voters may cast their vote outside the intended voting window.
Malicious actors could influence the election by submitting votes after seeing preliminary results, manipulating the outcome.
There is no mechanism to ensure that votes are only submitted during the active voting period.
Invalid Votes: Voters may unintentionally or maliciously submit votes after the election should have ended, leading to inaccurate results.
Manipulation Risk: Attackers could exploit the lack of time restriction to manipulate the voting process by submitting votes outside of the official voting window, especially after assessing preliminary results.
System Trust: Without a clear voting window, the legitimacy of election results could be questioned, undermining the system's integrity.
Set Voting Duration: Ensure that the start and end timestamps are configured when initiating the election, providing a clear voting window.
Enforce Voting Period: Introduce a voting window by adding a start and end timestamp to the voting period. Ensure votes are only accepted within this period.
Example Solution:
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.