When a user (Alice) expresses interest in another user (Bob) by calling the LikeRegistry::likeUser
function, the msg.value is not properly accounted for, causing the value to be stuck in the contract without being recorded in LikeRegistry::userBalances
.
When Alice calls the LikeRegistry::likeUser
function, passing Bob's address and sending 1e18 ETH, the value is not recorded in the userBalances mapping. Consequently, when Bob reciprocates the like with another 1e18 ETH, a multisig is created, but it starts with a balance of 0, as value was not recorded.
POC:
To reproduce the issue, add the following test case in the testSoulboundProfileNFT.t.sol
file.
User balances remain stuck in the LikeRegistry
contract indefinitely.
. Foundry
Modify the LikeRegistry::likeUser
function to correctly update the userBalances
mapping:
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.