Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: high
Invalid

People on the Nice List may not be able to collect presents.

Summary

People on the nice list may not be able to collect presents.

Vulnerability Details

In the collectPresent() , there is a check that requires waiting until Christmas to collect the present.

if (block.timestamp < CHRISTMAS_2023_BLOCK_TIME) {
revert SantasList__NotChristmasYet();
}

When checking if the msg.sender is eligible to collect, it is determined by whether the balance is greater than 0.

if (balanceOf(msg.sender) > 0) {
revert SantasList__AlreadyCollected();
}

If someone uses buyPresent() to buy apresent before Christmas, even if they are on the Nice List, they won't be able to collect the present.

Impact

People on the nice list cannot collect NFT and even token.

Tools Used

Recommendations

use a mapping with true/false values to store information about whether users have collected present

Updates

Lead Judging Commences

inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.