SantasList:buyPresent() burns token of the gift recipient resulting in underflow as gift recipient has no SantaTokens
Incorrect specification of address whose santaTokens are to be burned results in underflow & breaks the intended use of the buyPresent() functionality
High overall (High impact, High likelihood)
The Foundry test below fails with the current code...
Visual Studio Code, Foundry
Change the address whose tokens are to be burned from presentReceiver to msg.sender as shown below...
Note: The test provided above will still fail, since the _mintAndIncrement() function mints the NFT to msg.sender. Another finding regarding _mintAndIncrement() has been submitted, which will fix this issue and allow the above test to pass.
Current implementation allows a malicious actor to burn someone else's tokens as the burn function doesn't actually check for approvals.
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.