Wrong check in the codebase to prevent someone from minting duplicate NFTs.
To prevent the user from receiving a gift twice, the "collectPresent" function has the following check:
Malicious user can bypass this check by simply transferring the gift to his second address, so his current address balance will be 0.
a malicious user who passes two-step verification will be able to:
call the "collectPresent" function and receive a gift;
forward the gift to his second address;
call the "collectPresent" function again and receive another gift;
forward the gift to his second address again...;
This cycle will continue indefinitely.
Manual review.
Instead of checking balanceOf, recommended to add a new mapping "hasCollectedPresent" and change the function "collectPresent":
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.