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.
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.
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.
Manual review of the smart contract code.
To enhance transparency and user experience, consider implementing the following recommendation:
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.