The userBalances
mapping isn't updated when a user sends ETH.
The userBalances
mapping is used to store the sum of deposited ETH by each user thus far. In matchRewards
, the balances of the two users are summed to calculate the reward. By not updating userBalances
in the LikeRegistry::likeUser
or anywhere else, the reward will always be zero, which breaks the main functionality of the contract.
High impact - the main functionality of the contract is broken,. High likelihood, as the userBalances
mapping is never updated.
Manual review.
In the LikeRegistry::likeUser
function, update the userBalances
mapping to uncrement the amount of ETH sent by the 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.