President Elector

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

Lack of Event Emission for Critical State Changes

Description: The RankedChoice contract does not emit events for critical state changes, such as when a new president is selected or when candidates are ranked. Events are crucial for tracking changes and providing transparency and auditability in smart contracts.

Impact:

  • Lack of Transparency: Without events, it is difficult for off-chain systems and users to track changes and actions within the contract.

  • Auditability Issues: Monitoring and auditing the contract's behavior becomes challenging, as there is no record of critical state changes.

  • User Notification: Users and external systems cannot be easily notified of important changes, such as the election of a new president.

Proof of Concept: Currently, the contract does not emit any events, so there is no way to track when a new president is selected or when candidates are ranked.

Recommended Mitigation:

  • Emit Events for Critical Actions: Emit events for actions such as selecting a new president, ranking candidates, and any other significant state changes.

  • Define Clear Event Structures: Define events with clear and informative parameters to capture relevant details of the state changes.

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.