Flow

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

Missing `_verifyStreamSenderRecipient()` in `depositAndPause()`

Summary

The _verifyStreamSenderRecipient() function is used to verify the stream the user tries to interact with is actually the intended one by comparing the stream's recipient and sender to parameters supplied by the user.

This check has been implemented in all deposit*() functions.

https://github.com/Cyfrin/2024-10-sablier/blob/main/src/SablierFlow.sol#L268

function deposit(
uint256 streamId,
uint128 amount,
address sender,
address recipient
)
external
override
noDelegateCall
notNull(streamId)
notVoided(streamId)
updateMetadata(streamId)
{
// Check: the provided sender and recipient match the stream's sender and recipient.
@> _verifyStreamSenderRecipient(streamId, sender, recipient);

Vulnerability Details

The issue is that this safeguard is missing in the depositAndPause() function

Impact

Tokens may be deposited in an unintended stream.

Tools Used

Manual review

Recommendations

Add the _verifyStreamSenderRecipient() check in the depositAndPause() function.

Updates

Lead Judging Commences

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.