SantasList:buyPresent() does not check msg.sender's SantaToken balance to ensure they have enough to buy the present
SantasList:buyPresent() does not check msg.sender's SantaToken balance to ensure they have enough to buy the present, therefore a "gifter" can gift an NFT for less than the intended price of 2e18 SANTA. This could lead to excessive minting of the NFT and impact future value of it.
High
The Foundry test below will fail with current code, since it does not revert (user has 1e18 SANTA)...
Visual Studio Code, Foundry
Add a check to SantasList:buyPresent() to ensure the caller (gifter) has at least 2e18 SANTA, as shown below...
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.