DatingDapp

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

Contract LikeRegistry unnecessary direct transfers handling

Summary

Contract LikeRegistry allows direct transfers to be sent to it, but the contract's logic is not able to manage funds from direct transfers.

Impact

Including a receive() function might confuse other developers about the purpose of the contract or someone can accidentally send ETH to the smart contract and these funds will be locked inside the smart contract. The impact is indirect funds lock.

Recommendations

There are two ways to handle this issue:

  • Remove receive() external payable {}

  • Or add emergency withdraw method protected by the onlyOwner modifier that allows for the smart contract balance to be withdrawn.

First option is more preferable in order to ensure users for the decentralization of the smart contract balance.

Updates

Appeal created

n0kto Lead Judge 6 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.