Sparkn

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

Loss of precision

Summary

[L-03] Loss of precision

Division by large numbers may result in the result being zero, due to solidity not supporting fractions. Consider requiring a minimum amount for the numerator to ensure that it is always larger than the denominator

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

https://github.com/Cyfrin/2023-08-sparkn/blob/main/src/Distributor.sol#L146

Support

FAQs

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