There is a missing check on the mintRamNFT
function in the RamNFT
contract. This allows anyone to mint a RamNFT to anyone, which is not the functionality needed for the protocol. Users can simply mint as many NFTs as they want without going through the registration and entry fee process.
The open minting can be shown with the test below. Players should not be able to mint NFTs directly, it should only be possible via the Dussehra contract. A restriction to just the Dussehra contract is required. The mint function is lacking this protection.
This open minting has large consequences to the protocol. An malicious user can simply mint many NFTs and increase their chances of winning dramatically as the winner is selected from the NFT collection. This bypasses the entry fee requirement and allows a user to enter the competition without paying anything other than minting gas costs.
foundry and manual review
Change the RamNFT contract's minting function to include a modifier to protect the minting of NFTs and ensure only the ChoosingRam contract can mint.
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.