Flow

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

Missing Zero Address Check for Recipient in Stream Creation

Summary

Vulnerability Details

The _create function does not validate that the recipient address is non-zero, which could potentially result in tokens being sent to the zero address if called incorrectly. While this would not lead to a direct loss of funds due to NFT minting restrictions, it represents a deviation from best practices and could cause issues with stream management.

Proof of Concept

function _create(
address sender,
address recipient, // @audit No zero address validation
UD21x18 ratePerSecond,
IERC20 token,
bool transferable
) internal returns (uint256 streamId) {
// Checks sender but not recipient
if (sender == address(0)) {
revert Errors.SablierFlow_SenderZeroAddress();
}
// ... rest of the function
}

The function validates that sender != address(0) but has no equivalent check for the recipient parameter.

Tools Used

Manual Review

Recommendations

Add a zero address check for the recipient parameter similar to the sender check:

function _create(
address sender,
address recipient,
UD21x18 ratePerSecond,
IERC20 token,
bool transferable
) internal returns (uint256 streamId) {
// Check: the sender is not the zero address.
if (sender == address(0)) {
revert Errors.SablierFlow_SenderZeroAddress();
}
// Check: the recipient is not the zero address.
+ if (recipient == address(0)) {
+ revert Errors.SablierFlow_RecipientZeroAddress(); // New error type needed
+ }
// ... rest of the function
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 9 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.