Christmas Dinner

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

Duplicate Sign-Ups in receive function

Summary

If a user sends Ether multiple times to the contract, their participation status is updated repeatedly, and duplicate events are emitted.

Vulnerability Details

Impact

Duplicate Sign-Ups in receive

Tools Used

mannual review

Recommendations

Add a check to avoid duplicate updates to participant

receive() external payable {
+ if (!participant[msg.sender]) {
+ participant[msg.sender] = true;
+ }
etherBalance[msg.sender] += msg.value;
emit NewSignup(msg.sender, msg.value, true);
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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