Incorrect implementation of buyPresent() causes presentReceiver
to lose tokens.
buyPresent() burns the tokens of presentReceiver
instead of the msg.sender
. Effectively the msg.sender
receives free NFT by spending presentReceiver's tokens, if presentReceiver
had approved the SantasList contract to spend their SantaTokens.
Also, only 1e18 tokens are burnt. It should be 2e18 as defined here.
Note: This constant PURCHASED_PRESENT_COST
goes unused in the code. (Added in my recommendation)
Instead of receiving a present, the presentReceiver
loses santa tokens.
Manual inspection
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.