Directly send ETH funds, are permanently locked in the contract
The Game.sol
smart contract contains receive()
function, allowing unrestricted direct ETH transfers:
The smart contract logic provides mechanism to withdraw the platform fees from the smart contract owner:
and winners could withdraw their pending prizes, accumulated during the games:
Thus, any direct ETH transfer sent to the smart contract will lead to lock of ETH funds and their accumulation within the smart contract without any mechanism to be withdrawn.
Likelihood: Medium
Impact:
Any ETH sent directly to the contract are permanently locked
Users accidentally send ETH to the contract address will lose those funds, since there is no recovery mechanism for them
N/A
Manual review
Any of the following choices is a valid solution:
Remove function receive()
entirely:
Add revert in order to block direct ETH transfers:
Or implement appropriate withdraw function, allowing smart contract owner to withdraw the left contract funds. Implementing such mechanism should keep in mind, that all the funds related to pending winnings, should not be able to be withdrawn from the contract owner.
There is no reason for a user to directly send ETH or anything to this contract. Basic user mistake, info, invalid according to CH Docs.
There is no reason for a user to directly send ETH or anything to this contract. Basic user mistake, info, invalid according to CH Docs.
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.