The Game::getContractBalance()
function returns the raw Ether balance of the contract, it assumes that all ETH in the contract came through controlled functions and that the balance represents a valid sum of tracked internal state (like pot and platformfees).
However, the contract includes a fallback receive() function:
This allows anyone to send Ether directly to the contract without calling a tracked logic function. As a result, address(this).balance can become higher than the expected return.
Likelihood:
when malicious user sends ETH directly to the contract via send()
or transfer()
.
Impact:
shown misleading data
Change getContractBalance() to return internal variable:
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.