Sparkn

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

Hardcoded BASIS_POINTS in distributor contract

Summary

There is a non-zero chance that the commission fee and basis points could undergo decimal point adjustments in the future. Failing to avoid hardcoding the basis points may result in inaccuracies within percentage calculations

Vulnerability Details

if (totalPercentage != (10000 - COMMISSION_FEE)) {
revert Distributor__MismatchedPercentages();
}

Impact

The value of BASIS_POINTS is currently hardcoded as 10000, representing 100% with two decimal places. In the event of adjustments to commission fees involving additional decimals, this rigid coding could lead to inaccuracies in the overall percentage calculation

Tools Used

Manual Review

Recommendations

if (totalPercentage != (BASIS_POINTS - COMMISSION_FEE)) {
revert Distributor__MismatchedPercentages();
}

Support

FAQs

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