Description:
The function Game::getRemainingTime
has a checking like below :
and the function Game::declareWinner
has a checking as following :
The condition in declareWinner is strict but the one in getRemainingTime is not.
Impact:
This little change can cause some problem if the currentKing want to perfectly time the end of the game with the function Game::getRemainingTime
, before someone try to claim the throne again.
Proof of Concept:
Add the following test to Game.t.sol
Recommended Mitigation:
Change the condition in Game::getRemainingTime
:
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.