create and adjustratepersecond missing maximum bound
The create function does not check for maximum bound in the ratePerSecond param. It only checks for valid sender and token decimals amongst others. In the _adjustRatePerSecond function, it only checks if the rate is different but doesn't again check for the maximum bound. Rates can be adjusted really high which would lead to overflow risk // In _ongoingDebtScaledOf````uint256 elapsedTime = blockTimestamp - snapshotTime;````return elapsedTime * ratePerSecond; // Could overflow with extreme rates
and precision loss // High rates could lead to significant precision loss in calculations````uint256 solvencyAmount = balanceScaled - snapshotDebtScaled + oneMVTScaled;````uint256 solvencyPeriod = solvencyAmount / ratePerSecond;
Example Scenario:
Stream Balance: 1000 tokens
Rate: 1000 tokens/second
Result: Entire balance depleted in 1 second
precision loss and overflow risk against users.
Manual Review
Add Rate Validation in Creation. Rate Validation in Adjustment
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.