Description
The function SpookySwap::mintTreat implements the ERC721::_mint function instead of ERC721::_safeMint.
Impact
Some users may implement smart contracts to participate in the trick or treat. If the smart contracts lack support for ERC-721 tokens, their minted NFTs will get stuck inside them. This is due to the ERC721::_mint function doesn't verify if the receiving address supports ERC-721 tokens.
Proof of Concepts
A smart contract that doesn't support ERC-721 tokens calls the SpookySwap::trickOrTreat function
The smart contract receives the NFT
The owner of the contract is not allowed to transfer the NFT from the smart contract.
Tools Used
Foundry, VsCode
Recommended mitigation
Use ERC721::_safeMint instead of ERC721::_mint.
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.