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

Incorrect code description

Summary

Incorrect description of a code execution in FjordStaking.sol::stakeVested()

Vulnerability Details

As per FjordStaking.sol::stakeVested() function logic only authorized stream sender can stake a cancellable stream, here:

// only allow authorized stream sender to stake cancelable stream
if (!authorizedSablierSenders[sablier.getSender(_streamID)]) {
revert StreamNotSupported();
}

however, the way Sablier works, a sender can never stake their NFT, because NFT is not minted to a sender, it is minted to the recipient. See the related code logic from here:

// Effects: mint the NFT to the recipient.
_mint({ to: params.recipient, tokenId: streamId });

For this reason in stakeVested() the NFT will be transferred to the FjordStaking contract only if the caller is the recipient of the stream.

Impact

Confusion

Tools Used

Manual review

Recommendations

- // only allow authorized stream sender to stake cancelable stream
+ // Only allow recipient of authorized stream to stake cancelable stream
if (!authorizedSablierSenders[sablier.getSender(_streamID)]) {
revert StreamNotSupported();
}
Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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