Flow

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

Overflow in SablierFlow::_coveredDebtOf

Summary

there is a potential for overflow during the conversion from uint256 to uint128. This can happen if _totalDebtOf(streamId) returns a value larger than the maximum value that can be represented by a uint128.

Vulnerability Details

The main issue with this function is the potential for overflow when converting from uint256 to uint128. While Solidity 0.8.x handles overflows for basic math operations, explicit type conversions can still lead to unexpected behavior. Adding input validation, implementing proper checks on intermediate values, and considering the use of SafeCast could significantly improve the robustness of this function.

Impact

arithmetic underflow or overflow

Tools Used

Personal Knowledge

Recommendations

using this check

require(totalDebt <= type(uint128).max, "Total debt exceeds uint128 limit");
Updates

Lead Judging Commences

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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