The updateClaimFeeParameters
function lacks a modifier, enabling the owner to directly modify fee parameters even while the throne claim game is still active.
Impact:
During normal player participation, if the admin can arbitrarily change fee parameters, it becomes unfair to both existing and future players.
Players cannot predict whether their costs might suddenly increase significantly during their participation.
This verification assumes the claimThrone
function has already fixed the following two issues:
Correct initial check: require(msg.sender != currentKing, "Game: You are already the king. No need to re-claim.");
Proper handling of the previous king's reward: uint256 previousKingPayout = (sentAmount * previousKngFeePercentage) / 100;
Admin deploys the contract.
Player player1
pays the claim fee and calls claimThrone
.
Player player2
pays the claim fee and calls claimThrone
.
Admin calls updateClaimFeeParameters
to increase the entry fee.
Player player1
must now pay a significantly higher fee to claim the throne again.
Player player2
must also pay a significantly higher fee to claim the throne again.
Simply add the gameEndedOnly
modifier to the updateClaimFeeParameters
function, restricting the admin to only update parameters after the game has ended:
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.