The setGameContract
function allows the owner to assign a new game contract responsible for minting NFTs. However, if ownership is renounced, anyone can take control of minting by setting their own malicious game contract. This can lead to unauthorized NFT creation, significantly compromising the integrity of the smart contract.
The function allows the owner to set the game contract without verifying if _gameContract
is a trusted smart contract.
If renounceOwnership()
is called, ownership is lost, making setGameContract
accessible to anyone.
An attacker can take over the contract by setting their own contract as gameContract
and mint unlimited NFTs.
The integrity of the NFT collection is compromised, leading to supply inflation and potential loss of value.
If ownership is renounced, there is no way to recover control, permanently exposing the contract to abuse.
Manual Review
Deployer should be ownder should be metioned as message.sender
Prevent ownership renouncement
Owner is trusted and is not expected to interact in ways that would compromise security
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.