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

SablierNfts may be locked in `FJordStaking` contract

Summary

The ERC721s may get stuck in the staking contract beacause of not supporting ERC721.

Vulnerability Details

On stakeVested(), staking contract receive Sablier ERC721 token from the Caller

sablier.transferFrom({ from: msg.sender, to: address(this), tokenId: _streamID });

It Uses `transferFrom()`

Most importantly according to EIP-721 standard

A wallet/broker/auction application MUST implement the wallet interface if it will accept safe transfers.

Reference :- https://eips.ethereum.org/EIPS/eip-721

But here Staking contract doesnot implemented anything such

Links

https://github.com/Cyfrin/2024-08-fjord/blob/0312fa9dca29fa7ed9fc432fdcd05545b736575d/src/FjordStaking.sol#L435

Tools Used

vsCode

Recommendations

Implement Support Interfaces as per mentioned in EIP-721 standard

function onERC721Received(address _operator, address _from, uint256 _tokenId, bytes _data) external returns(bytes4);

Use `safeTransfer` and `safeTransferFrom()`

Updates

Lead Judging Commences

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

Support

FAQs

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