When a token based game finishes, more tokens are minted
In _finishGame
, _handleTie
and _cancelGame
winningToken.mint
is being called. For token based games, the users already transferred the WinningToken to the RockPaperScissors
contract so instead of minting a new token it can do the following winningToken.transfer(to, amount)
.
The only time it is okay to mint a token is when a ETH based game finishes since the contract might not have the balance to reward the winner.
This is not a security vulnerability but it is making the token more inflationary than it should. Since there isn't a max supply or burn mechanism, it is better to min the tokens only when it is necessary, which is the moment an ETH game finishes.
Manual review
replace .mint
, with transfer
whenever a token is transferred to a token based player.
Example:
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.