Impact: Medium
Likelihood: High
Severity: Medium
The protocol allows for several matches for a single profile as suggested by the LikeRegistry::matches
mapping. However this design introduces a potential issue where a MultiSig wallet may be created with only one contributing party.
Users who haven't explicitly checked userBalances of the profile they are going to like, will expect a contribution of at least 1 ether to the MultiSig from the other user. This is expected because they got liked by that user and the price of a like is 1 ether. Upon receiving a partial ownership of a MultiSig with less value than they put in on their own, users might feel misled.
Add the following event in LikeRegistry.sol
and emit it after the MultiSig has been created:
Update the userBalances with this line in LikeRegistry.sol::likeUser
The following test demonstrates:
-Alice ---> liking(Bob)
-Alice ---> liking(Connor)
Whoever likes Alice back second, will end up with 0.9 of their own 1 ether in a MultiSig with Alice, which might be not what they expected.
Manual Review
Ensure a userBalance check before matching, that the user which liked first still has a balance of 1 ether.
In LikeRegistry.sol::matchUser
add this as this as the first line:
This will ensure the MultiSig has at least the minimum contribution to be expected from both parties.
Likelihood: Medium, if anyone has 2 matches or more before reliking. Impact: Medium, the user won't contribute to the wallet.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.