The contract implements a receive()
function with an empty body. While this function correctly accepts incoming Ether, it fails to update any internal accounting variables like pot
or platformFeesBalance
. This leaves the received funds untracked by the game's logic.
This leads to a permanent loss of funds for any user who sends ETH directly to the contract. Because the funds are untracked by the internal accounting, no mechanism exists to withdraw them, causing them to be locked in the contract forever.
The contract includes a payable receive()
function, allowing it to accept direct Ether transfers. However, the function lacks any logic to account for these funds. This causes any received ETH to become untracked and permanently locked within the contract, leading to a direct loss of funds for the sender.
Likelihood:
Reason 1: A user mistakenly sends ETH directly to the contract address, bypassing the claimThrone
function.
Reason 2: An automated script or another smart contract incorrectly interacts with the game by sending it raw Ether.
Impact:
Impact 1: The sender's funds are permanently and irreversibly locked within the contract with no mechanism for recovery.
Impact 2: This creates a loss-of-funds scenario that can harm users and damage the protocol's reputation for safety.
The recommended mitigation is to completely disallow direct Ether transfers to the contract. This can be achieved by removing the payable receive()
function. If a user accidentally tries to send ETH to the contract, the transaction will revert, protecting them from losing their funds.
By removing this function, the contract will no longer have a mechanism to accept raw Ether, thus eliminating the vulnerability entirely.
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.