If winner player is an a smart contract the player can reenter using receive function in their smart contract, but since most of the mutable function on the Game
contract it's have modifier that prevent reentrant to those function(i.e nonReentrant
or onlyOwner
). It is also can be more dangerous in the future, when Game
contract may inherated more dependencies that can posibilly modify any state in the Game
contracts.
Likelihood:
when winner player is an a smart contract and have receive function that posibilly call malicious function or any action that can posibily drain funds or modify some state variable
Impact:
No loss of funds or modify state variable when attacker reenter for now
future risk, when Game
contract may inherated more dependencies that can posibilly modify any state in the Game
contracts and attacker can call any function from dependencies that can modify state or steal/drains funds Game
contract balance.
Follow CEI(Checks Effects Interactions) pattern to prevent reentrancy:
We only audit the current code in scope. We cannot make speculation with respect to how this codebase will evolve in the future. For now there is a nonReentrant modifier which mitigates any reentrancy. CEI is a good practice, but it's not mandatory. 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.