The LikeRegistry::userBalances
mapping keeps a record of user balances. A user's balance is supposed to be increased by the value sent by other users in the LikeRegistry::likeUser
function, for a minimum of 1 ether per like. This value is used by the LikeRegistry::matchRewards
function to calculate the amount to be given to the users' multiSig wallet in case of a match. The balance for every user remains zero throughout the contract because it is never updated.
Users do not have access to the funds they receive from likes, and cannot use the multiSig wallet functionality that the app promises.
testUserBalanceUpdate below proves that the balance of the user receiving the like is never updated, even though the value is deducted from the user calling the function.
VSCode, Foundry
In the LikeRegistry::likeUser
function, update LikeRegistry::userBalances
for the receiver by the value sent in the transaction.
If the value of each like is fixed, counting the number of likes received can be another method to calculate user balance.
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.