DatingDapp

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

LikeRegistry: Missing Balance Updates in `likeUser`

[High] LikeRegistry: Missing Balance Updates in likeUser

ETH is sent but not tracked in userBalances, leading to lost funds.

Impact: Users lose funds when sending ETH to like others.

Proof of Concept:

function likeUser(address liked) external payable {
require(msg.value >= 1 ether, "Must send at least 1 ETH");
@> // Missing: userBalances[msg.sender] += msg.value
likes[msg.sender][liked] = true;
}

Recommended Mitigation: Add balance tracking:

+ userBalances[msg.sender] += msg.value;
Updates

Appeal created

n0kto Lead Judge 6 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.