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

`refund` function is not following CEI pattern, could have potential reentrancy

Summary

PuppyRaffle::refund function is not following CEI pattern to transfer the funds to players, a malicious actor could do reentrancy and steal all the funds.

Vulnerability Details

PuppyRaffle::refund function transferring the funds using sendValue first and then updating the player address to zero.

Impact

Could lose all the funds from contract.

Tools Used

Manual Review

Recommendations

Follow CEI pattern or use a reentrancy guard provided by openzepplin library.

Updates

Lead Judging Commences

Hamiltonite Lead Judge about 2 years ago
Submission Judgement Published
Invalidated
Reason: Vague generalities

Support

FAQs

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

Give us feedback!