In collectPresent
function, it used balanceOf(msg.sender)
to calculate current user's balance, however user can collect one and transfer out one so that he can collect infintely nft.
Write the POC below, user can call collectPresent
in a loop for any times to collect more nfts.
All nfts can be minted to one user.
Manual Review
Add a record in contract instead of using balanceOf
to check if it's second collect.
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.