Multiple instances of unsafe uint256 to uint40 type casting in the SablierFlow contract pose significant risks due to potential data truncation. This affects timestamp handling across critical functions.
Risk Rating: medieum
Current timestamps (~1.7B) exceed uint40 max (1.09T)
Truncation leads to incorrect stream timing
Affects withdrawals, debt tracking, and payment schedules
Core functionality compromised
slither .
Manuel code review
Implement SafeCast for all timestamp conversions
Consider upgrading timestamp storage to uint64
Add input validation for timestamps
Review all timestamp-dependent calculations
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.