The like
function accepts payments of 1 ETH or more instead of requiring exactly 1 ETH, violating the protocol's specified economic constraints of "To express interest in someone, they pay 1 ETH to "like" their profile.". It's a clear requirement that the like transfer has to be of 1 ETH.
The require statement
uses >= 1 ether
rather than strict equality (== 1 ether
). This allows users to send excess ETH that becomes trapped in the contract until manual withdrawal by owners, despite protocol docs specifying exact 1 ETH payments for likes.
High:
Users may accidentally overpay with no refund mechanism
Creates accounting imbalance between actual contract balance and totalFees
tracking
Violates core protocol economic model requiring predictable 1 ETH costs
Manual code review
Slither static analysis (would flag arbitrary value acceptance)
This aligns with protocol requirements and prevents fund trapping. If flexible payments are needed, implement an automatic refund mechanism for excess amounts.
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.