The RankedChoice contract does not emit events for critical actions such as ranking candidates or selecting a new president. The absence of event logs hampers transparency, monitoring, and debugging efforts, making it difficult to track the contract's state and history.
Missing Events:
Ranking Candidates:
Functions rankCandidates and rankCandidatesBySig do not emit events upon successful ranking.
Selecting President:
The selectPresident function does not emit an event when a new president is selected.
Users cannot easily verify their votes or monitor election progress.
Reduced trust in the contract's operations as actions are not transparently recorded.
Manual Code Review: Identified the absence of event declarations and emissions within critical functions.
Static Analysis Tools: Verified the lack of event-related patterns using tools like Slither.
Ranking Candidates:
Selecting President:
Emit Events in Internal Functions:
Ensure that helper functions like _rankCandidates also emit relevant events to capture every state change.
Leverage Indexed Parameters:
Use indexed keyword for frequently queried parameters to enhance event filtering and retrieval efficiency.
Implement tests to verify that events are correctly emitted during critical actions.
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.