Santa's List

AI First Flight #3
Beginner FriendlyFoundry
EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

SantasList.Status has the extraneous element NOT_CHECKED_TWICE, while the README calls this UNKNOWN instead

Root + Impact

Description

  • SantasList.Status has the element NOT_CHECKED_TWICE which is not used in the codebase.

  • Additionally the project's README file calls this element UNKNOWN, which shows a discrepancy between the codebase and the README's discription of the codebase.

  • This descrepancy introduces the possibility that devs will build functionality for the Status enum that will not correspond to how it is truly defined in the SantasList contract.

// In SantasList:
enum Status {
NICE,
EXTRA_NICE,
NAUGHTY,
@> NOT_CHECKED_TWICE
}
// In the README:
@> The SantaToken is an ERC20 that can be used to buy the NFT for their NAUGHTY or UNKNOWN friends.
...
@> checkList: A function that changes an address to a new Status of NICE, EXTRA_NICE, NAUGHTY, or UNKNOWN on the original s_theListCheckedOnce list.
@> checkTwice: A function that changes an address to a new Status of NICE, EXTRA_NICE, NAUGHTY, or UNKNOWN on the new s_theListCheckedTwice list only if someone has already been marked on the s_theListCheckedOnce.
...
@> User - Can buyPresents and mint NFTs depending on their status of NICE, NAUGHTY, EXTRA-NICE or UNKNOWN

Risk

Likelihood:

  • Development coming about through the descrepancy of the description and definition of the Status enum can result in code being written for an element of the enum that doesn't exist.

  • Further description of the codebase will be confused if it relies upon erroneous information within itself.

Impact:

  • This will cause confusion about the Status enum.

Proof of Concept

Recommended Mitigation

- remove this code
- Remove mentions of the UNKNOWN element in the README
+ add this code
+ Replace mentions of UNKNOWN in the README with NOT_CHECKED_TWICE
Updates

Lead Judging Commences

ai-first-flight-judge Lead Judge about 4 hours ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!