The RockPaperScissors contract permanently locks player token stakes in token-based games while minting new tokens for payouts, causing continuous supply inflation and effective loss of player deposits.
In token-based games, 1 RPSW token is transferred from each player to the contract through transferFrom() calls when creating and joining games. However, these tokens are never transferred back to players. Instead, when a game completes, is tied, or is canceled, the contract mints new tokens for the players rather than returning the original staked tokens. This design flaw permanently locks tokens in the contract with no mechanism to recover them and creates continuous token supply inflation, devaluing the token over time.
The issue occurs in three primary contract locations:
Token collection without return mechanism:
Minting new tokens instead of returning staked ones:
Missing token recovery functionality:
The contract lacks any function to withdraw, burn, or otherwise retrieve the locked tokens.
For each completed token-based game, two tokens are permanently locked in the contract, and two new tokens are minted, increasing the total supply. This creates an inflationary mechanism with no bounds, as the WinningToken contract has no maximum supply cap.
Permanent token loss for players: Players never recover their original staked tokens.
Unchecked token supply inflation: Each token-based game increases total token supply by 2 tokens.
Token value dilution: As more games are played, the uncapped inflation devalues existing tokens.
Economic imbalance: The design undermines any economic utility model for the token.
This is classified as High severity because it:
Results in permanent loss of user assets (the staked tokens)
Creates an economic design flaw that systemically affects all users
Increases in impact as more token-based games are played
Manual code review
Implement one of the following solutions:
Option 1: Return original staked tokens (preferred)
Option 2: Burn and mint exact amounts
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.