The contract mints new WinningToken
tokens during game resolution (completion/cancellation) instead of transferring the originally staked tokens locked in the contract. This creates an infinite supply of tokens and permanently traps user-deposited tokens in the contract.
**Token Prize Distribution **
(`RockPaperScissors::_finishGame` function)
Game Cancellation Logic (RockPaperScissors::_cancelGame
function)
RockPaperScissors::_finishGame
):RockPaperScissors::_cancelGame
):Step 1: Attacker creates a token-based game (transfers 1 WinningToken
to the contract).
Step 2: Attacker joins their own game with a second account (transfers another token).
Step 3: Attacker cancels the game via timeoutJoin
.
Result:
Contract mints 2 new tokens (1 to each "player").
Original 2 tokens remain locked in the contract.
Total token supply increases by +2 per iteration.
Step 1: Attacker creates a single-turn token game.
Step 2: Attacker completes the game (winning fairly or via timeout).
Result:
Contract mints 2 new tokens to the winner.
Original 2 tokens remain locked in the contract.
Total token supply increases by +2 per game.
Token Supply:
Infinite inflation via unrestricted minting, rendering the token worthless.
User Funds:
All tokens deposited in games are permanently locked in the contract.
Protocol Integrity:
Loss of trust due to broken economic model and inability to honor token redemptions.
Replace Minting with Token Transfers:
Add Balance Checks:
Burn Tokens on ETH Game Wins:
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.