Anyone can call checkList
and set the status of a person because it is missing the onlySanta
modifier. This allows a malicious person to front run a collectPresent
call and DoS a NICE
or EXTRA_NICE
user attempting to collect their present(s) by changing their status to NAUGHTY
.
Santa calls checkList
and sets cindyLouWho
to EXTRA_NICE
in s_theListCheckedOnce
mapping.
Santa calls checkTwice
and sets cindyLouWho
to EXTRA_NICE
in s_theListCheckedTwo
mapping.
cindyLouWho
attempts to call collectPresent
to collect her free NFT and token.
theGrinch
is looking for collectPresent
calls in the mempool. When he sees cindyLouWho
attempt to collect her present, his MEV bot can quickly call checkList
, passing in cindryLouWho
and NAUGHTY
, causing the s_theListCheckedOnce
mapping to update her status to NAUGHTY
. Because the mappings do not match, the status checks will fail inside of collectPresent
for cindyLouWho
, and she will not be able to get her free gifts.
Santa will have to manually set her status back to EXTRA_NICE
, but theGrinch
can frontrun her again, unless Santa has a faster MEV bot than theGrinch
.
Add this test to the existing suite.
Users can get DoS'ed by a malicious actor who frontruns their collectPresent
call by calling checkList
and changing their status to NAUGHTY
.
Manual Review
Add the onlySanta
modifier to the checkList
function.
Anyone is able to call checkList() changing the status of a provided address. This is not intended functionality and is meant to be callable by only Santa.
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.