The game is designed to distribute portions of the claim fee to different parties such as the platform and the pot, while potentially paying the previous king a portion of the claim fee.
The variable previousKingPayout is declared and initialized but never assigned or used to pay the previous king. This leaves dead code that may confuse developers or auditors and suggests unfinished or abandoned logic.
Likelihood:
This will be encountered every time a player claims the throne, as the variable is always initialized but unused.
This is persistent throughout the contract’s lifecycle unless the code is refactored.
Impact:
Causes confusion and reduces code clarity and maintainability.
May indicate incomplete or abandoned payout logic that could lead to misunderstanding of game mechanics.
This demonstrates that the variable is redundant and can mislead maintainers or auditors reviewing the contract.
Removing unused variables prevents confusion and improves the maintainability of the smart contract codebase.
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.