DeFiFoundry
20,000 USDC
View results
Submission Details
Severity: low
Invalid

Loss of precision when calculating rewards

Summary

Note: This bug has been found by LightChaser but not all instances have been reported

In Solidity, when performing division, the quotient may round down, potentially causing users to receive less funds than intended.

Vulnerability Details

When calling solidity’s native arithmetic functions, there is a possibility of the quotient rounding down, this also happens when using the SafeMath library.

See the following instances of using SafeMath::div that have not been caught by LightChaser:

Impact

Minor loss of funds

Tools Used

Manual Review

Recommendations

Consider using the PRBMath library to improve the precision of division operations

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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