The SablierV2Lockup::cancel
function cancels the stream and refunds any remaining assets to the sender. The sender, who created the stream, possesses the power to cancel it at any point between the stream start and end time, retrieving the remaining amount (total - already streamed amount). However, if the sender is blacklisted by the token, they will not be able to cancel the stream, and the funds will flow to all recipients. The protocol uses ERC20 tokens with pause/blacklisting properties like USDC.
https://github.com/Cyfrin/2024-05-Sablier/blob/main/v2-core/src/abstracts/SablierV2Lockup.sol#L256
In the current implementation, the protocol refunds the funds to the sender's address when canceling the stream. If the sender is blacklisted by the asset, the refund will revert, preventing the stream from being canceled and causing it to continue
The root cause of this issue is that the implementation does not follow a 2-step withdrawal process. This process is implemented for recipients, who claim in one transaction and withdraw in another, but not for the sender. If a sender/team decides to stream a large amount of funds and gets blacklisted, they will lose all the funds in the stream due to the blocked cancel stream functionality
Instead, the protocol should allow the stream to be canceled and wait for the sender to be unblacklisted so that they can withdraw their funds later
The sender will lose all of their funds due to the blocked cancel functionality.
Manual
Implement a 2-step withdrawal process: cancel the stream in one step and provide a withdrawal functionality in a second step
https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity
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.