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

FjordStaking contract doesn't have onERC721Received function to receive ERC721 tokens.

Summary

To receive ERC721 tokens which is called upon a safe transfer, the contract must implement the onERC721Received function.
The onERC721Received function is called when the contract receives an ERC721 token by invoking safeTransferFrom function.
However, the FjordStaking contract doesn't have the onERC721Received function.
The FjordStaking contract receives ERC721 tokens from the Sablier contract, so it must implement the onERC721Received function.

Vulnerability Details

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

Impact

The unimplemented onERC721Received function can cause the contract to not receive ERC721 tokens from the Sablier contract.

Tools Used

Manual review

Recommendations

It's recommended to implement the onERC721Received function in the FjordStaking contract.

Updates

Lead Judging Commences

inallhonesty Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

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