MyCut

First Flight #23
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Valid

Decimal Handling Issue: Rewards Sent to claimants and manager as the Smallest Unit Instead of Intended Whole Number

Summary

Rewards are set to whole numbers, but when sent to the contract, they are not properly accounted for due to decimal handling issues. Claimants receive the smallest units leaving money behind in the pot

Vulnerability Details

Rewards are specified as whole numbers, but when transferred or received by the contract, they are incorrectly handled as the smallest units (e.g., wei) instead of the intended amounts.
This discrepancy occurs during both sending and receiving of rewards, leading to incorrect distribution and leftover funds.

Impact

Underpayment to Claimants: Claimants receive less than the intended amount due to improper conversion of reward units.
The issue leads to underpayment of rewards and leftover funds, which affects the accuracy of payouts.

Tools Used

Unit tests

Recommendations

Convert Rewards to Wei: When setting or transferring rewards, convert values to wei to ensure proper handling and storage.

Updates

Lead Judging Commences

equious Lead Judge 9 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Dusty Pot

Support

FAQs

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