President Elector

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

Title: Lack of Event Emission for `RankedChoice::selectPresident()` Function

Summary

The RankedChoice::selectPresident() function updates critical state variables, such as the current president, without emitting an event. This limits the transparency and auditability of the election process, making it difficult for off-chain systems to track when a new president is selected. Event emissions are vital for logging significant state changes and improving the interaction between smart contracts and external systems.

Vulnerability Details

Impact

Tools Used

Manual review

Recommendations

Introduce an event, PresidentSelected, that is emitted whenever a new president is chosen. This will improve the transparency, auditability, and overall reliability of the election process.

+ event PresidentSelected(address indexed newPresident);
function selectPresident() external {
// ... function's code.
+ emit PresidentSelected(s_currentPresident);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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