The contract LikeRegistry.sol
has a function called LikeRegistry::likeUser
which calls LikeRegistry::matchRewards
. Inside this function, a fee is calculated and added to a state variable called totalFees
. Only the owner of the contract can withdraw those fees, however, the LikeRegistry::withdrawFees
function only transfers the amount gathered from the totalFees
variable. Since the contract has a receive
function, if some ether is sent to the it will permanently locked inside the contract.
The LikeRegistry::matchRewards
function where the totalFees
variable is incremented.
The LikeRegistry::withdrawFees
function where only the value of totalFees
is withdrawn from the contract.
Finally, the receive
function:
Any balance that does not come from the collection of fees from the LikeRegistry::matchRewards
function will be locked inside the contract, since that's the only place where totalFees
is incremented.
Manual Review
Create a separate function that only the owner can call that sends all the balance of the contract instead of only the value stored on the totalFees
variable.
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.