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

The total amount collected in the raffle in wrongly calculated

Reference

L131 of the PuppyRaffle.sol: uint256 totalAmountCollected = players.length * entranceFee;

Summary

The calculation is wrong as the first player would be paying zero eth to enter the raffle, and also wrong because the payment made by other players increases geometrically and not arithmetically. It also affects the total prize pool in the contract as well as the total fees.

Vulnerability Details

Impact

Tools Used

Manual Review

Recommendations

Consider using a mapping to keep track the amount each players entered into the raffle.

Updates

Lead Judging Commences

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

Support

FAQs

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

Give us feedback!