Malicious user can collect more than 1 NFT because of wrong/lack of checks
SantasList::collectPresent
is using balanceOf()
as an check to track minted NFT, this balanceOf()
can be manipulated/changed by transferring the token
How this will work
Malicious user got checked NICE OR EXTRA_NICE both the time by santa
Now,malicious user is eligible to collectPresent
and he claims his present for the first time
He got 1 NFT ie balanceOf(malicious_user) = 1
Then he transfers his NFT to other address, therefore balanceOf(malicious_user) = 0
Now, again he can collectPresent
and repeat this cycle
//Here is the POC
Malicious user can mint as many NFT as he wants therefore no need to buy NFTs by paying santaToken
Manual Review
Instead of using balanceOf()
use mapping to keep track of amount of token minted by an address and use it as check
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.