Flow

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

The `SablierFlow::adjustRatePerSecond` function utilizes a `notPaused` modifier, which pervents the `sender` role from unpausing the stream

Summary

According to the code and documentation, pausing of the stream can be done with setting ratePerSecond parameter to zero. So sender can pause by using SablierFlow::adjustRatePerSecond function and setting the newRatePerSecond parameter to zero or using SablierFlow::pause function.
On the other hand, sender should be able to unpause by using SablierFlow::adjustRatePerSecond function and setting the newRatePerSecond parameter to non-zero value or using SablierFlow::restart function.
The problem arises when sender attempts to unpause the stream by changing ratePerSecond parameter to non-zero value with SablierFlow::adjustRatePerSecond function. This is because this function utilizes a notPaused modifier.

Impact

sender unable to unpause paused stream with SablierFlow::adjustRatePerSecond function. sender can unpause with SablierFlow::restart though, So it's low severity.

Recommendations

Simply remove the notPaused modifier from SablierFlow::adjustRatePerSecond function. This change will not impact the ongoingDebtScaled or any other parameters. and add notVoided modifier instead. notVoided modifier is enough to prevent sender to change the ratePerSecond after stream terminated.

function adjustRatePerSecond(
uint256 streamId,
UD21x18 newRatePerSecond
)
external
override
noDelegateCall
notNull(streamId)
- notPaused(streamId)
+ notVoided(streamId)
onlySender(streamId)
updateMetadata(streamId)
{...
Updates

Lead Judging Commences

inallhonesty Lead Judge
11 months ago
inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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