The _cancelGame
function uses the value of game.bet
to determine whether the game involved native ETH or in-game tokens. Specifically, game.bet > 0
is interpreted as an ETH-based game, while game.bet == 0
is assumed to indicate a token-based game. This dual-purpose use of game.bet
is a fragile design that can lead to incorrect behavior, misinterpretation of the game type, and potential asset mismanagement.
Asset Loss
Mint Exploit
Adding other asset types could silently break the logic
manual review
Refactor the logic to explicitly track the game’s asset type using an enum
. For example
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.