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

Faulty Token Balance Check in `collectPresent` Function

Vulnerability Details

The collectPresent function incorrectly checks the Ethereum (ETH) balance of msg.sender instead of their specific token balance.

if (balanceOf(msg.sender) > 0) { //@audit wrong balance check
revert SantasList__AlreadyCollected();
}

Impact

  1. Incorrect Validation: Addresses with zero tokens but a non-zero ETH balance are unjustly prevented from collecting presents.

  2. Token Collection Issue: Legitimate token holders may be erroneously barred from collecting their due presents.

Recommendations

Correct Balance Check: Modify the check to validate the specific token balance of msg.sender.

Updates

Lead Judging Commences

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.