The joinGameWithEth
function is missing a check to ensure that timeoutInterval
is less than or equal to revealDeadline
.
If the contract don’t check whether timeoutInterval <= revealDeadline
, the game logic can become inconsistent or exploitable.
A malicious player could set a very short revealDeadline
with a long timeoutInterval
, making it impossible for the opponent to reveal their move in time.
This could result in unfair timeouts or denial of fair gameplay.
Player may be unfairly timed out
Opponent may be unable to complete the reveal phase
Manual review
Add a validation to ensure that timeoutInterval
does not exceed revealDeadline
Fixed code:
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.