Sablier

Sablier
DeFiFoundry
53,440 USDC
View results
Submission Details
Severity: medium
Invalid

SablierV2MerkleLL , SablierV2MerkleLT : _handleTransfer function call is missing before creating the stream

Summary

Since the fund transfer is not done before creating the stream, the stream creation operation will fails due to insufficient funds from the mekrlee based contract.

Vulnerability Details

Both the SablierV2MerkleLL and SablierV2MerkleLT makes the external calls to the coressonding steam creation contracts.

so the msg.sender will be the SablierV2MerkleLL and SablierV2MerkleLT.

when the stream is crated, the fund is transferred from the msg.sender to sablier contract.

But in the SablierV2MerkleLL and SablierV2MerkleLT contract, funds are not transferred from the caller to this merklee contract.

For example,

https://github.com/Cyfrin/2024-05-Sablier/blob/43d7e752a68bba2a1d73d3d6466c3059079ed0c6/v2-periphery/src/SablierV2MerkleLT.sol#L94-L109

// Effect: mark the index as claimed.
_claimedBitMap.set(index);
// Interaction: create the stream via {SablierV2LockupTranched}.
streamId = LOCKUP_TRANCHED.createWithDurations(
LockupTranched.CreateWithDurations({
sender: admin,
recipient: recipient,
totalAmount: amount,
asset: ASSET,
cancelable: CANCELABLE,
transferable: TRANSFERABLE,
tranches: tranches,
broker: Broker({ account: address(0), fee: ZERO })
})
);

Impact

Since the funds transfer is not done beforehand, either the stream can not be created or the stream can be created using the funds from these contracts.

First case would be DOS and second case would be loss of funds to the protocol.

Tools Used

Manual review.

Recommendations

We would suggest to include the _handleTransfer call for SablierV2MerkleLL and SablierV2MerkleLT as well.

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement
ak1 Submitter
about 1 year ago
inallhonesty Lead Judge
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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