Flow

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

Pausing Without Emitting

Summary

In SablierFlow::adjustRatePerSecond, sender can pause the stream by setting the ratePerSecond to 0. This will not emit event for pausing the stream.

Impact

Event PauseFlowStream for pausing the stream it's not emitted when the stream is paused by the adjustRatePerSecond. Any backend system that depends on this event, will not receive this event.

Tools Used

Manual review

Recommendations

Add the following check to the adjustRatePerSecond:

function adjustRatePerSecond(
uint256 streamId,
UD21x18 newRatePerSecond
)
external
override
noDelegateCall
notNull(streamId)
notPaused(streamId)
onlySender(streamId)
updateMetadata(streamId)
{
UD21x18 oldRatePerSecond = _streams[streamId].ratePerSecond;
+ require(newRatePerSecond != 0, "Can't pause the stream in this function");
// Effects and Interactions: adjust the rate per second.
_adjustRatePerSecond(streamId, newRatePerSecond);
// Log the adjustment.
emit ISablierFlow.AdjustFlowStream({
streamId: streamId,
totalDebt: _totalDebtOf(streamId),
oldRatePerSecond: oldRatePerSecond,
newRatePerSecond: newRatePerSecond
});
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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