The SpookySwap contract uses unsafe NFT transfer methods (_mint
and _transfer
) instead of their safe counterparts (_safeMint
and _safeTransfer
). This can lead to permanent loss of NFTs when they are transferred to contracts that don't support ERC721 token reception.
The contract implements NFT transfers in two critical functions:
In the mintTreat
internal function:
In the resolveTrick
function:
The vulnerability arises because these functions don't verify whether the recipient can handle ERC721 tokens. According to the ERC721 standard, contracts must implement the onERC721Received
function to receive tokens. Without this check, tokens can be permanently locked in contracts that don't support ERC721.
Example of a vulnerable scenario:
Permanent loss of NFTs when transferred to incompatible contracts
No recovery mechanism for lost tokens
Potential financial loss for users who accidentally send NFTs to contract addresses
Deterioration of user trust in the platform
Manual review
Replace unsafe transfer methods with their safe counterparts:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.