The LikeRegistry
contract accepts Ether via its receive()
function. However, if a user or external contract mistakenly sends Ether directly to the contract, there is no mechanism to recover these funds. As a result, the Ether becomes permanently locked.
The issue stems from the absence of a recovery function for Ether not explicitly linked to protocol operations. The LikeRegistry
contract tracks user balances and fees related to the likeUser()
function but does not account for Ether sent outside of this process. Since the contract lacks a way to retrieve untracked funds, any Ether sent directly to the contract address becomes irrecoverable.
Accidentally sent funds remain permanently locked in the contract, leading to potential financial loss for users.
Introduce a recovery function, restricted to the contract owner, to withdraw untracked Ether without affecting protocol-managed balances (e.g., totalFees
). Following, an example on how to implement this function:
Not the best design, but if you send money accidentally, that's a user mistake. Informational.
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.