If recipient
of a Stream is a contract & that contract doesn't implement any onLockupStreamCanceled()
, so there is no sence for try/catch
block as transaction flow never goes inside catch
its always result is revert
try/catch
block used in multiple part of the code, i'm show casing only one below and later section i will mention other infected parts
The above code segment is from SablierV2LockUp._cancel()
Here if recipient
of a Stream is a contract
which doesn't implement onLockupStreamCanceled()
then Tx will revert and catch block
wouldn't helpfull anymore.
This thing is severe problamatic here as in Code base cancel()
used to Cancels the stream and refunds any remaining assets to the sender
Due to above reason cancel()
lead to an DoS (Direct loss of Sender & there is no profit for recipient as well explaining below)
If Sender
intentionally didn't implement onLockupStreamWithdrawn()
then all user withdrawable fund get locked.
If recepient
didn't implement onLockupStreamWithdrawn()
all of its fund get locked.
Lead to DoS
Manual review
Maybe use a wrapper contract, which is trusted for both parties and is internally calling to those functions (which are intended to be implemented) on the untrusted target.
This issue was previously found in Sherlock's taller-protocol-v2-audit
contest,
This is how they mitigate this.
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.