President Elector

First Flight #24
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Lack of event emission

Summary

The RankedChoice contract manages a ranked voting system to elect a president, but it lacks event emissions for critical actions such as vote submissions, candidate selections, and election results. This absence of event logging diminishes the transparency and traceability of the contract's operations, making it difficult for external observers, users, and off-chain services to track and verify important actions. Event emissions are a vital component of any smart contract to ensure accountability and enable real-time monitoring of state changes.

Vulnerability Details

The contract does not emit events for key actions such as voting, ranking candidates, or selecting a president.

Impact

Without events to track important operations like vote submissions and election results, users and external systems cannot easily track or monitor when votes are cast, candidates are ranked, or a president is selected. Without events, this information can only be gathered by querying the contract's state directly, which is inefficient and costly.

Tools Used

Manual Review

Recommendations

Introduce events for critical actions such as VoteCast, CandidateRanked, and PresidentSelected.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.