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

Misleading Contract Comments Regarding Automatic Raffle Draws

Vulnerability Details

Comments suggest an automatic raffle draw functionality that is not implemented in the contract code. The comment states:

/// 4. Every X seconds, the raffle will be able to draw a winner and be minted a random puppy

However, there is no mechanism within the contract to automatically trigger a raffle draw based on a time interval. The actual implementation requires an external call to the selectWinner function to determine and mint the winner, and this function does not include any logic to automate the process based on time intervals.

Impact

The discrepancy between the contract's documentation/comments and its actual behavior can lead to confusion and misunderstanding among users and developers. It may create false expectations regarding the functionality of the contract, potentially affecting user engagement and trust. Moreover, if the intention was to have an automated drawing mechanism, the current implementation fails to meet this requirement.

Recommendations

  • Correct Documentation: Update the contract comments to accurately reflect the current functionality. If the raffle draw is not automated and requires an external trigger, this should be clearly stated.

  • Implement Intended Features: If the original intention was to have an automated raffle draw based on time intervals, consider implementing this feature. This could involve using external services like Ethereum alarm clocks or oracle-based triggers.

Updates

Lead Judging Commences

patrickalphac Lead Judge about 2 years ago
Submission Judgement Published
Invalidated
Reason: User experience and design improvement

Support

FAQs

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

Give us feedback!