Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Valid

No Event Emitted in `selectWinner`

Summary

The selectWinner function in the PuppyRaffle contract does not emit an event when a winner is selected. This omission can hinder transparency and make it difficult for users and external systems to track the raffle results.

Vulnerability Details

In the selectWinner function, after selecting a winner, no event is emitted to announce the result or provide information about the winning address. This lack of an event can make it challenging for users, external systems, and dApps to monitor the outcome of the raffle or take actions based on the result.

Impact

  • Low: While not a critical vulnerability, the absence of an event in the selectWinner function can reduce the transparency and user-friendliness of the contract.

Tools Used

  • Manual review of the smart contract code.

Recommendations

To enhance transparency and user experience, consider implementing the following recommendation:

  1. Emit an event in the selectWinner function to announce the result, including the winning address and any relevant information about the winning participant. This event can be beneficial for users and external systems tracking the raffle.

By emitting an event, the contract can provide better visibility into raffle results and improve the overall user experience.

Updates

Lead Judging Commences

Hamiltonite Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

events are missing or not detailed enough

Support

FAQs

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