DatingDapp

First Flight #33
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Directly sending ether to the `LikeRegistry` contract would make the funds unrecoverable

Description

Since there is a receive() function in the LikeRegistry contract, a user can accidentally send ether to the contract.

Impact

This can result in the loss of user funds directly sent to the LikeRegistry contract.

Recommended Mitigation

Remove the receive() function from the LikeRegistry contract as it's not supposed to receive funds directly, just via the LikeRegistry::likeUser function which is already payable and can receive ether successfully.

- /// @notice Allows the contract to receive ETH
- receive() external payable {}
Updates

Appeal created

n0kto Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

invalid_receive_function

Not the best design, but if you send money accidentally, that's a user mistake. Informational.

Support

FAQs

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