s_previousVoteEndTimeStamp is not initiatedDescription: s_previousVoteEndTimeStamp is not initiated :
In the constructor we don't initialized s_previousVoteEndTimeStamp. So s_previousVoteEndTimeStamp is 0. The following check in the function selectPresident() will always be true.
Impact: We can break the first election of president with that. We can rankCandidate() and selectPresident() directly after to make my voted candidate president directly.
Proof of Code:
Recommended Mitigation:
Please initialize s_previousVoteEndTimeStamp to block.timestamp in the constructor.
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.