A sender
when cancelling his streams has no ways of specifying the address to refund the senderAmount
to which can lead to cancellations being impossible if he's blocklisted by underlying asset as the refund cannot be processed.
When the sender
decides to cancel the stream, he calls the cancel
function passing "only" the streamId
, this is important to keep in mind as it means that further down the line, the amount to be refunded will be sent to the msg.sender
which is established in the cancel
function to be the sender
of the stream. The internal _cancel
function is then called.
The _cancel
function performs the needed calculations, including calculating the senderAmount
which is the amount to refund, retrieving the sender
's address and also the asset. The function then attempts to transfer the senderAmount
to the sender
's address.
Now, from the readme, the protocol is compatible with any ERC20 tokens expect for the assumptions listed here
Compatibilities
Sablier protocol is compatible with the following:
Any network which is EVM compatible
Any ERC20 token
This means that the asset can be any ERC20 token, including tokens that have the blocklist functionality. Many commonly used token including USDC, USDT, ONDO have this functionality and can blocklist users from transfers. A typical blocklist token looks like this, or a variation meaning that a blocked sender's refund transaction will fail and the stream will be uncancellable.
This can also cause a temporary DOS when attempting to cancel multiple streams of which the asset's stream is among.
Sender will not be able to canel a stream.
Manual Review
Consider allowing the sender to be able to specify a to
in the cancel
function. The to
will be refunded the senderAmount
. If no to
is provided, the refund will be made to the sender
instead.
https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity
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.