The LikeRegistry contract's matchRewards function relies on the userBalances mapping to calculate rewards for matched users. However, the userBalances mapping is never updated, resulting in zero balances and no rewards being distributed.
In the matchRewards function, the userBalances mapping is used to retrieve the balances of the matched users. These balances are then used to calculate the total rewards and fees. However, the userBalances mapping is never updated in the contract, meaning that the balances will always be zero.
No Rewards Distributed: Since userBalances is never updated, the balances will always be zero, resulting in no rewards being distributed to the matched users. Also the platform will not collect the intended fees from the rewards, impacting the revenue model.
Manual code review
Ensure that the userBalances mapping is updated appropriately when users interact with the contract. For example, update the balances when users send ETH to like another user.
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.