Christmas Dinner

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

NewSignup event Incorrectly Emitted in Receive() function

Summary

Emission of new signup in receive() violates the protocol invariant that no signups should occur via ETH.

Vulnerability Details

receive() external payable {
etherBalance[msg.sender] += msg.value;
emit NewSignup(msg.sender, msg.value, true); //@audit violates non-eth signups invariant.
}

Impact

An event emitted that is not consistent with the protocol invariant that no signups should occur using ETH deposits.

Tools Used

Manual review

Recommendations

Refactor as follows:

receive() external payable {
etherBalance[msg.sender] += msg.value;
}
Updates

Lead Judging Commences

0xtimefliez Lead Judge about 1 year 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!