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

Restrictive Status Update in `checkTwice` Function

Vulnerability Details

The checkTwice function is overly restrictive, only allowing Santa to set a user's status on the second list (s_theListCheckedTwice) to be identical to their status on the first list (s_theListCheckedOnce). This limitation prevents Santa from elevating a user's status from NICE to EXTRA_NICE if the user's status on the first list is NICE.

function checkTwice(address person, Status status) external onlySanta {
if (s_theListCheckedOnce[person] != status) {
revert SantasList__SecondCheckDoesntMatchFirst();
}
s_theListCheckedTwice[person] = status;
emit CheckedTwice(person, status);
}

Impact

Limited Flexibility: Santa cannot adjust a user's status.

Recommendations

Modify Check Logic: Allow Santa to elevate a user's status on the second list regardless of their status on the first list, or only if their status on the first list is NICE.

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.