Flow

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

no check for tokens with lower token decimals lower than 18, and can cause underflow and disruption of the protocol

Summary

The SablierFlow:_create function has checks for only higher decimals not for lower decimals than 18 which can cause underflows like USDC and other tokens with low token decimals.

Vulnerability Details

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

Impact

Allowing tokens with fewer decimals than required can lead to rounding errors, inaccurate balances, and possible underflows in calculations.

Tools Used

Manual Review

Recommendations

- if (tokenDecimals > 18) {
- revert Errors.SablierFlow_InvalidTokenDecimals(address(token));
- }
+if (tokenDecimals != 18) {
+ 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.