Sparkn

CodeFox Inc.
DeFiFoundryProxy
15,000 USDC
View results
Submission Details
Severity: low
Valid

Loss of precision

Summary

Loss of precision

Vulnerability Details

Division by large numbers may result in the result being zero, due to solidity not supporting fractions.

File: src/Distributor.sol
146: uint256 amount = totalAmount * percentages[i] / BASIS_POINTS;

Impact

Loss of precision in distributing rewards to winners

Tools Used

Manual

Recommendations

Consider requiring a minimum amount for the numerator to ensure that it is always larger than the denominator

Support

FAQs

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

Give us feedback!