GivingThanks

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

Missing Event Emissions for Key State Changes

Summary

The CharityRegistry contract does not currently emit any events to track important state changes. Implementing event emission is crucial for improving the contract's auditability and transparency.

Vulnerability Details

The contract does not emit any events to track important state changes, such as when a charity is registered, verified, or when the admin is changed.

Impact

Without events, it is difficult for users, donors, and auditors to track when a charity has been registered, verified, or when the admin has been changed. This can reduce trust, especially in a charitable setting where transparency is key to donor confidence.

Tools Used

  • Manual Review

Recommendations

Implement event emission in the CharityRegistry contract like this:

event CharityRegistered(address indexed charity);
event CharityVerified(address indexed charity);
event AdminChanged(address indexed oldAdmin, address indexed newAdmin);

Then emit the appropriate events in the corresponding functions:

  • Emit the CharityRegistered event in the registerCharity() function.

  • Emit the CharityVerified event in the verifyCharity() function.

  • Emit the AdminChanged event in the changeAdmin() function.

Updates

Lead Judging Commences

n0kto Lead Judge 10 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.