It was found that the function matchRewards
transfer all the funds(balances of liked and liker) to the multisig wallet where the owner are user A(Liker) and user B(liked) if the like is mutual. But it doesn't delete both the users `likes` mapping which results in the fund stuck of the user who liked after there mutual likes.
Scenario 1:
user A Liked user B
user A aslo like user C
Now User B liked User A before than user C so according to the likeRegistory
contract likeUser
and matchRewards
function the balances of both the user are transfered to the MultiSigWallet
in which all the balances of user A and user B is stored and A, B are the owners of the funds.
But now user C also like the user A and because of that mutual likes check in the likeRegistory
contract likeUser
and matchRewards
function the balance of user C is only gets transfered to the MultiSigWallet
because the balances of user A = 0 and also this time the owner is A, C and if A didn't approve the user C funds got stucked in the MultiSigWallet
for ever.
Scenario 2:
user A(Malicious attacker 1 account) liked user B.
user C (Malicious attacker 2 account).
Now user B is going to like back user A but the transactions not get executed fully.
Malicious user observe the transaction in the memepool and like his account 1 i.e user A from account 2 i.e user C by front running and gets approved firstly by user B.
Now all the funds or balances from user A and user C (both the account of malicious user) are transfered to the MultiSigWallet
and malicious user can withdraw its funds successfully, But now user C funds get in the MultiSigWallet
where the owners are user A (Malicious attacker 1 account) and user B. An malicious user can do 2 things now can go on date with user B funds or cannot approve the transactions which leads to user B funds get stucked in the contract.
observe both the function
Funds Stuck in MultiSig – Users may lose access to funds if their counterpart refuses to approve withdrawals, disrupting the protocol’s functionality.
Exploitation via Front-Running – Attackers can manipulate the matching process to trap user funds in a MultiSig wallet they control.
Financial Loss & Trust Issues – Users may face fund losses, leading to dissatisfaction and reduced trust in the platform.
Manual Review
Add a proper code which clear the likes mapping of the user if got mutual like by someone.
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.