The SablierFlow::_create function in the Sablier contract lacks validation to ensure that the recipient address is not set to the zero address. Since this check occurs only after state updates, it violates the Checks-Effects-Interactions (CEI) pattern. This oversight could lead to wasted gas if a stream is created with a zero address recipient, as unnecessary state updates are performed before the failure condition is triggered.
The SablierFlow::_create function does not validate the recipient address upfront, leading to potential gas loss if a zero address is provided as the recipient. This can result in inefficient gas usage due to unnecessary state updates.
Without this check, the function could incur unnecessary gas costs and unwanted state updates if the zero address is used as the recipient.
Manual review.
Add a validation check at the start of the _create function to ensure that the recipient is not the zero address, preventing unnecessary gas usage. Add an appropriate error code to the Errors library, and revert the transaction if the zero address is detected.
In Errors.sol:
In SablierFlow::_create:
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.