DatingDapp

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

Match Funds Stuck When User Burns Profile

Summary

When a matched user burns their profile, the other person in the match can't access their shared funds in the MultiSig wallet because it needs both signatures.

Vulnerability Details

function burnProfile() external {
uint256 tokenId = profileToToken[msg.sender];
require(tokenId != 0, "No profile found");
_burn(tokenId);
delete profileToToken[msg.sender];
delete _profiles[tokenId];
// No handling of active matches
// MultiSig wallet becomes unusable
// Other user's ETH gets stuck
}

Impact

  • Other owner can't get his ETH.

  • ETH gets stuck in MultiSig

Tools Used

Recommendations

Funds needs to be returned to both users before the other other owners profile is burnt

function burnProfile() external {
uint256 tokenId = profileToToken[msg.sender];
require(tokenId != 0, "No profile found");
require(ownerOf(tokenId) == msg.sender, "Not profile owner");
+ // First return match funds to both users
+ address[] memory userMatches = likeRegistry.getMatches(msg.sender);
+ for(uint i = 0; i < userMatches.length; i++) {
+ address matchedWith = userMatches[i];
+ multiSig.emergencyRefund(msg.sender, matchedWith);
+ }
// Then burn profile
_burn(tokenId);
delete profileToToken[msg.sender];
delete _profiles[tokenId];
emit ProfileBurned(msg.sender, tokenId);
}
Updates

Appeal created

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

Users mistake, only impacting themselves.

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood 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.