The RockPaperScissors::_finishGame
and RockPaperScissors::_handleTie
functions in token-based games mint new WinningToken
tokens as rewards or refunds, but do not return or burn the tokens that were originally staked via transferFrom
.
This leads to two critical issues:
Permanent lock of staked tokens inside the contract.
Unbounded inflation of the token supply due to redundant minting.
As players can repeatedly create and win or tie games, they can farm tokens without real economic input, severely diluting the value of WinningToken
.
Permanent Token Lock
Players’ staked tokens (2 per game) are transferred into the contract and never returned or burned.
Unbounded Token Inflation & Value Dilution
Every token‑based game outcome mints new tokens without reusing stakes.
Circulating supply grows uncontrollably, diluting the token’s economic value and breaking scarcity.
Total supply grows linearly with gameplay volume.
Staked tokens are stuck forever, clogging contract state.
WinningToken's economic model becomes meaningless, breaking trust and reducing incentive integrity.
This PoC simulates five 1-turn token-based games where Player A always wins. Each time:
Player A and Player B each stake 1 WinningToken
via transferFrom
.
The contract mints 2 new tokens to Player A upon winning (_finishGame
).
The 2 staked tokens remain locked in the contract and are never returned or burned.
After 5 rounds:
Player A gains 5 net tokens.
The contract holds 10 permanently locked tokens.
The total token supply increases by 10 (5 rounds × 2 minted).
This confirms the vulnerability: token inflation and unrecoverable stake lock.
Manual Review
Foundry Unit Testing
Return Deposited Tokens Instead of Minting
Burn Deposits Before Minting (if return is not feasible)
Mints new tokens upon game completion or cancellation for token-based games
Mints new tokens upon game completion or cancellation for token-based games
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.