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

Incomplete decimals handling in reward calculation

Summary

The reward calculation in ThePredicter.sol may lose precision due to integer division.

Vulnerability Details

The calculation (shares * players.length * entranceFee) / totalShares performs integer division, which could result in lost decimals thus incorrect reward distribution.

Impact

Players receive less than they're entitled to

Tools Used

Manual code review

Recommendations

Use a fixed-point arithmetic library

Updates

Lead Judging Commences

NightHawK Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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