Christmas Dinner

First Flight #31
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

Duplicate Participant Marking

Summary

the else block is executed when the caller msg.sender is not already marked as a participants. However the current implementation always updates the participant[msg.sender] mapping with participants[msg.sender] = true, regardless of whether the caller is already a participant or not.
While logically correct the user ends up being a participant.

Impact

This redundant state updates can:

  • Consume gas unnecessarily.

  • Leads to inefficient storage operations

Tools Used

Manual review

Recommendations

Ensure the else block only executes when msg.sender is not already a participant

Updates

Lead Judging Commences

0xtimefliez Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Too generic

Support

FAQs

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