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

Contract functionality depends on external actors

Summary

The prize pool is send to the winner, so the success of the PuppyRaffle::selectWinner function depends on the winner fallback function.

Vulnerability Details

The winner can revert or provoke a DoS attack on his fallback.

Impact

This vulnerability does not result on funds being drained but affects the functionality of the contract and its reliability

Tools Used

Foundry

Recommendations

My recommendation is to always avoid external dependencies. Instead of sending the Prize Pool, a withdraw pattern should be implemented. In that way the protocol is quite robust and invulnerable.

Updates

Lead Judging Commences

patrickalphac Lead Judge about 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

smart contract wallet without fallback/receive will halt the raffle

Support

FAQs

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

Give us feedback!