mintNft() allows any whitelisted address to mint as much nfts as it wants by paying some usdc collateral for mintingNormal- Whitelisted users should be able to mint NFTs; however, a per-user mint limit should be enforced to prevent a single user from minting the entire supply.
Issue- There are no limits which opens a risk of DoS for other users when trying to mint an nft
Likelihood:
High - it can occur at anytime from any whitelisted account
Impact:
Critical - If one consumes all the nfts and max supply is reached , other users cannot mint
Attacker is a whitelisted user and has good amount of USDC.
Attacker repeatedly calls mintNft() in a loop.
Each call successfully mints an NFT and increases total supply.
Attacker continues minting until maxSupply is reached.
A new whitelisted user attempts to mint an NFT.
mintNft() reverts with "Max supply reached".
The new user is unable to mint, effectively denied access.
Add a mapping(address account => uint256 nfts) amountOfNfts and store each user how many nfts he has minted. Consider adding a limit example 5 per account and validate when minting that the current account is withing the limits.
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.
The contest is complete and the rewards are being distributed.