The contract assumes at least one claim will occur before declareWinner function is called. However, there is no safeguard or fallback if the round has no participants. This results in a permanent soft lock of the current game round and any automation relying on round transitions.
Likelihood:
Medium - This depends on player activity. In low participation scenarios such as early launch and abandoned games, this is realistic.
Impact:
Breaks core functionality, game cannot end or progress to next round unless at least one claim occurs.
This test demonstrates a denial of service condition in the declareWinner function when no one has claimed the throne:
Add a conditional branch in declareWinner to handle cases where no one has claimed the throne (currentKing == address(0)) by emitting a GameEndedWithoutWinner event and marking the game as ended. This prevents a permanent DoS and allows the game to progress safely.
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.