Description:
In the likeUser
function found in the LikeRegistry, users must send at least 1 ETH when liking another user. However, the contract does not track this ETH in userBalances[msg.sender]
. This means that when a match occurs, the reward distribution logic in matchRewards
will not properly allocate funds, leading to potential loss or mismanagement of ETH.
Impact:
Users' ETH contributions are not recorded, leading to incorrect reward calculations when a match occurs.
When matchRewards
is executed, userBalances[from]
and userBalances[to]
are both zero, meaning totalRewards
will also be zero. Consequently, the MultiSig wallet will receive no funds, and users will not receive their match rewards.
The contract effectively collects ETH from users without any proper way to refund or use it as intended.
**Proof of Code: **
Proof of Concept:
User A calls likeUser(userB)
and sends 1 ETH.
The contract does not update userBalances[userA]
.
User B later calls likeUser(userA)
, creating a match.
matchRewards
is triggered, but since userBalances[userA]
and userBalances[userB]
are zero, no rewards are sent to the MultiSig wallet.
The ETH remains in the contract, and users receive nothing.
Recommended Mitigation:
Modify the likeUser
function to properly track ETH contributions by adding:
Likelihood: High, always. Impact: High, loss of funds
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.