Flow

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

Incorrect Token Decimals Error Message

Summary

The error message for token decimals validation is misleading and does not match the actual validation logic.

Vulnerability Details

The contract throws an error suggesting validation for decimals > 18, but actually throws when decimals = 0:

if (tokenDecimals > 18) {
revert Errors.SablierFlow_InvalidTokenDecimals(address(token));
}

/// @notice Thrown when trying to create a stream with an token with no decimals.✅
error SablierFlow_InvalidTokenDecimals(address token);

Impact

Misleading error messages

Confusion for integrators and users

Tools Used

Manual code review

Recommendations

Correct error message to match validation logic

Add separate validation for zero decimals

Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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