Since the Status
enum's default state is NICE
, after the CHRISTMAS_2023_BLOCK_TIME
has passed, any user may call the external function collectPresent()
and mint an NFT for themselves without being checked twice by Santa address.
The Status
enum is structured in such that the default state is NICE
, as shown below.
This exposes an issue within the external function collectPresent()
. According to the documentation, "In order for someone to be considered NICE or EXTRA_NICE they must be first "checked twice" by Santa." Because the default state for every user for both mappings s_theListCheckedOnce[msg.sender]
and s_theListCheckedTwice[msg.sender]
equates to NICE
, this allows the below check in collectPresent()
to always be true by default, without the 2nd check from the santa wallet.
Here is a PoC written as a forge test demonstrating a user's ability to mint an NFT without being checked once or twice by Santa. This test passes in the forge workspace.
Any user, may mint an NFT despite not being checked twice.
Forge
Set another non-permitting state as the Status
enum's default (highest-level) state. Options may inclue UKNOWN
or UNCHECKED
. See example below.
In Solidity the first element of an enum is the default value. In Santa's List, the means each person is mapped by default to 'NICE'.
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.