The mintRamNFT function in the RamNFT contract allows any user to mint new NFTs without restrictions. This lack of access control can lead to unauthorized minting, which could potentially be exploited to overwhelm the contract's resources or disrupt its intended functionality.
The mintRamNFT function is implemented as follows:
Access Control: The function does not check whether the caller is authorized to mint NFTs, allowing any address to call this function and mint new tokens.
Security Risk: Without proper checks, malicious actors could mint NFTs excessively.
Unauthorized Minting: Any user can mint NFTs, which can lead to an overflow of tokens and potential system abuse.
Gas Abuse: The contract could be overwhelmed with minting requests, leading to high gas costs and possible degradation of performance.
Manual code analysis
To mitigate the risk, implement access control checks to ensure that only authorized entities can mint NFTs. This can be done by verifying that the caller has paid the entry fee or has specific permissions set by the contract owner.
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.