Rock Paper Scissors

First Flight #38
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Invalid

Missing Access Control on `WinningToken.mint()`

Description: The mint() function in WinningToken.sol is only protected by the onlyOwner modifier, but there's no mechanism to prevent the owner from minting unlimited tokens to themselves or others.

Impact: The owner could mint an unlimited number of tokens, potentially devaluing the token and disrupting the game's economy.

Proof of Concept:

function mint(address to, uint256 amount) external onlyOwner {
_mint(to, amount);
}

Recommended Mitigation: Implement a maximum supply cap or restrict minting to specific conditions (e.g., only when a game is won).Implement a maximum supply cap or restrict minting to specific conditions (e.g., only when a game is won).

Updates

Appeal created

m3dython Lead Judge about 2 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.