Sparkn

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

Loss of precision

Summary

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

Vulnerability Details

There is 1 instance of this issue.

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

Impact

Unexpected/undesired amount calculation.

Tools Used

baudit: a custom static code analysis tool; manual review

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.