The LikeRegistry contract's likeUser
function improperly handles ETH payments by accepting more than the required 1 ETH fee without providing refunds. This leads to permanent loss of user funds through locked overpayments.
According to the protocol documentation, users should pay exactly 1 ETH to like another profile. However, the likeUser
function only validates that the payment is >= 1 ETH without refunding excess amounts:
Permanent loss of user funds through overpayment
Users cannot recover excess ETH
Enforce exact payment of 1 ETH:
OR
Add refund for overpayments:
Foundry Testing Framework
Manual Review
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.