-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use _safeTransfer
when transferring NFTs
#65
Comments
This transfer function is just for the market to move the NFTs while the market is operational, during this phase it doesn't matter if the NFT is given to a non-compliant contract as the market is in control of moving the NFT and will simply give it to the next user that makes a rental. |
|
Ahh sorry, I missed the key part in the wardens impact "when transferring the card to the final winner". I still think this isn't an issue as if the destination is a non-compliant contract, when using Maybe we could check when the first rental is made that the sender is eligible? Although that would deviate slightly from the standard as |
Handle
shw
Vulnerability details
Impact
The
transferNft
function ofRCNftHubL2
is called when transferring the card to the final winner. However, this function does not check whether the recipient is aware of the ERC721 protocol and calls_transfer
directly. If the recipient is a contract not aware of incoming NFTs, then the transferred NFT would be locked in the recipient forever.Proof of Concept
Referenced code:
RCNftHubL2.sol#L135
Recommended Mitigation Steps
Use the
_safeTransfer
function instead, which checks if the recipient contract implements theonERC721Received
interface to avoid loss of NFTs.The text was updated successfully, but these errors were encountered: