Unauthorized participation of deployer
in the game, allows him to earn regular prizes
Uncomplete validation within function claimThone()
allows the Deployer
to participate in the game and claim the throne. Thus Deployer
is eligible to earn regular rewards like all other participants in the game. But granting them an unfair and unauthorized competitive advantage, since as an Owner
he can changes the game parameters.
According to the protocol requirements:
It is not explicitly stated that the Deployer is allowed to invoke the claimThrone() function. This omission leads to a misalignment between the intended design and the actual implementation, where the claimThrone() method permits the Deployer
to become the King, effectively making them a participant in the game and eligible to receive rewards.
A potential exploit scenario is as follows:
The Deployer
calls claimThrone(), becomes the current King, and pays the required claimFee
.
Having privileged control over the game parameters, the Deployer
can then significantly reduce the gracePeriod
Subsequently secures the prize by invoking declareWinner()
— either through a standard transaction or by monitoring the mempool and executing a front-running attack to preempt other participants.
This behavior violates the protocol’s role separation expectations and introduces a centralization risk, where the Deployer can manipulate game outcomes for personal gain.
Likelihood: High
Impact:
The claimThrone()
implementation breaches the protocol’s intended role separation, introducing centralization and trust risks.
The Deployer
can become King, effectively participating as a player and receiving rewards.
With privileged control over game parameters, the Deployer
can manipulate outcomes for personal benefit.
Manual review
Foundry
Add validation to claimThone()
function as follows:
This change ensures the Deployer
adheres to their designated role within the game, eliminating their ability to become King and participate as a regular player. It prevents them from earning rewards while retaining the unfair advantage of being the contract Owner.
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.