Christmas Dinner

First Flight #31
Beginner FriendlyFoundrySolidity
100 EXP
View results
Submission Details
Severity: medium
Valid

Ether signups fails to sign up the sender as a participant.

Summary

Ether signups fails to sign up the sender as a participant.

Vulnerability Details

The function correctly handles the receipt of Ether by adjusting the sender's etherBalance, but it overlooks the crucial step of actually registering the sender as a participant within the event.

Impact

The failure of the ChristmasDinner smart contract to register senders of Ether as participants, despite accepting their contributions, leads to a significant functional discrepancy that affects user engagement and trust. Users who send Ether assume they are registered for the event, but their lack of official participant status may prevent them from accessing participant-specific functions such as refunds, voting, or other activities integral to the event. This oversight could result in confusion, dissatisfaction, and potential disputes, undermining the integrity of the event management process and potentially leading to reputational damage for the organizers or developers of the contract.

Tools Used

foundry

Recommendations

change the code to:

receive() external payable {
etherBalance[msg.sender] += msg.value;
participant[msg.sender] = true; // Register the sender as a participant
emit NewSignup(msg.sender, msg.value, true);
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 11 months ago
Submission Judgement Published
Validated
Assigned finding tags:

receive does not update participation status

Support

FAQs

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