Using balanceOf[msg.sender] in collectPresent may allow user to collect multiple NFT's
The collectPresent function checks if the balance of NFTs of a user is greater than 0 to prevent multiple collections. This check might not work properly if the user transfers their initially collected NFT to another address and tries to collect again.
Users can to mint NFT's indefinitely
Foundry
Use a mapping to track how many presents each user has collected and check the mapping instead of the user balance in collectPresent function.
mapping(address person => int collectedPresents) private s_userCollectedPresents;
Relying on balanceOf > 0 in collectPresent() allows the msg.sender to send their present to another address and then collect again.
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.