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

Previous winner is set before sending funds

Summary

Previous winner variable previousWinner is set before making sure that the funds are correctly sent.

Vulnerability Details

This vulnerability can lead to reward manipulation.

Impact

Funds might be incorrectly sent or not sent at all.

Tools Used

Manual code analysis.

Recommendations

+ (bool success,) = winner.call{value: prizePool}("");
+ require(success, "PuppyRaffle: Failed to send prize pool to winner");
previousWinner = winner;
- (bool success,) = winner.call{value: prizePool}("");
- require(success, "PuppyRaffle: Failed to send prize pool to winner");
_safeMint(winner, tokenId);
Updates

Lead Judging Commences

patrickalphac Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Other

Support

FAQs

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