Flow

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

Unbounded Token Decimals Lower Bound

Vulnerability Details

While the function checks that token decimals are not greater than 18, it doesn't validate a lower bound. A token with 0 or extremely low decimals could lead to precision issues in rate calculations.

Proof of Concept

uint8 tokenDecimals = IERC20Metadata(address(token)).decimals();
// Check: the token decimals are not greater than 18.
if (tokenDecimals > 18) {
revert Errors.SablierFlow_InvalidTokenDecimals(address(token));
}

Tools Used

Manual review

Recommendations

Add a minimum decimal requirement:

- if (tokenDecimals > 18) {
+ if (tokenDecimals > 18 || tokenDecimals < MIN_DECIMALS) {
revert Errors.SablierFlow_InvalidTokenDecimals(address(token));
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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