DatingDapp

First Flight #33
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: high
Valid

userBalances are never updated thereby causing users lose their funds

Summary

likeUser::LikeRegistry.solrequires users to deposit 1 eth or above. The function fails to update the user balance which leads wrong accounting in calculation of totalFees.

Vulnerability Details

Poc

function echidna_balance_greater_1() public view returns (bool) {
return userBalances[msg.sender] >0;
}

the above echidna would always return false, same as below

function echidna_match_rewards()public view returns (bool){
return totalFees > 0;
}

Impact

leads to wrong calculation of totalFees, reward and other values tat depend on the userbalances

Tools Used

manual review

Recommendations

userBalances should be updated when they deposit funds

Updates

Appeal created

n0kto Lead Judge 7 months ago
Submission Judgement Published
Validated
Assigned finding tags:

finding_likeUser_no_userBalances_updated

Likelihood: High, always. Impact: High, loss of funds

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.