DatingDapp

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

[H-2] No functionality to unlike users in `LikeRegistry.sol` makes funds stuck until someone likes you back

Summary

A user can like another through the LikeRegistry::likeUser function, but there's currently no functionality to unlike in order to get the ETH back, even when burning their profile using the SoulboundProfileNFT::burnProfile function.

Impact

This leads to permanently stuck funds unless every user you liked, likes you back, which is simply not likely.

Recommendations

Two functionalities should be added:

  • An unlikeUser function in LikeRegistry.sol that refunds the placed ETH on the specific address set as input.

  • A refund functionality in SoulboundProfileNFT::burnProfile and/or SoulboundProfileNFT::blockProfile that maps to every ETH the user has placed in likes.

Both of these are easier to implement using the mapping userMatchBalance proposed in the "[H-1] Variable LikeRegistry::userBalance doesn't actually map to user balance and is always 0, completely disrupting all protocol functionality" issue.

Updates

Appeal created

n0kto Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
Assigned finding tags:

Informational or Gas

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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