Normal behavior:
The contract should not accept ETH after the game has ended, or should immediately refund any ETH sent after game end, to prevent accidental loss of funds.
Specific issue:
The contract’s receive()
function accepts ETH at any time, even after gameEnded == true
. Any ETH sent to the contract after the game ends is not added to the pot or platform fees, and there is no mechanism to withdraw or recover these funds. This results in ETH being permanently locked in the contract.
Likelihood:
This will occur whenever anyone sends ETH to the contract after the game ends.
Impact:
ETH is permanently lost and cannot be recovered by any user or the owner.
Users may lose funds by mistake, leading to loss of trust in the protocol.
The following test demonstrates the bug. After the game ends, a user sends ETH to the contract. The ETH is accepted, but is not added to the pot or platform fees, and cannot be withdrawn by anyone.
Block or refund ETH sent to the contract after the game ends by updating the receive()
function:
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.