DatingDapp

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

MultiSigWallet Not Stored, Making It Untraceable

Summary

When a match occurs in the LikeRegistry contract, a MultiSigWallet is deployed for the two matched users. However, the deployed wallet instance is not stored anywhere in the contract, making it impossible to retrieve or track later. This results in losing access to the multisig wallet, preventing users from managing their shared funds.

Vulnerability Details

Issue in LikeRegistry::matchRewards function,A MultiSigWallet instance is created when a match occurs:

MultiSigWallet multiSigWallet = new MultiSigWallet(from, to);

However, this instance is not stored anywhere, making it impossible to reference later.

function testMultisigWalletNotStored() public {
vm.prank(user);
soulboundNFT.mintProfile("Alice", 25, "ipfs://profileImage");
vm.prank(user2);
soulboundNFT.mintProfile("Bob", 25, "ipfs://profileImage");
vm.prank(user);
likeRegistry.likeUser{value: 1e18}(user2);
vm.prank(user2);
likeRegistry.likeUser{value: 1e18}(user);
}

Impact

Users cannot track their deployed multisig wallet, resulting in permanent loss of funds.

Tools Used

. Foundry

Recommendations

Store the MultiSigWallet instance in a mapping so users can retrieve their wallet later.
Modify LikeRegistry::matchRewards to store the wallet address:

+ mapping(address => mapping(address => address)) public multiSigWallets;
+ event MultiSigWalletCreated(address indexed from, address indexed to,address multiSigWallet);
function matchRewards(address from, address to) internal {
uint256 matchUserOne = userBalances[from];
uint256 matchUserTwo = userBalances[to];
userBalances[from] = 0;
userBalances[to] = 0;
uint256 totalRewards = matchUserOne + matchUserTwo;
uint256 matchingFees = (totalRewards * FIXEDFEE ) / 100;
uint256 rewards = totalRewards - matchingFees;
totalFees += matchingFees;
// Deploy MultiSig wallet and store its address
MultiSigWallet multiSigWallet = new MultiSigWallet(from, to);
+ multiSigWallets[from][to] = address(multiSigWallet);
+ multiSigWallets[to][from] = address(multiSigWallet);
// Send ETH to the deployed multisig wallet
(bool success, ) = payable(address(multiSigWallet)).call{value: rewards}("");
require(success, "Transfer failed");
+ emit MultiSigWalletCreated(from, to, address(multiSigWallet));
}
Updates

Appeal created

n0kto Lead Judge 4 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
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.