External call to usdc.transferFrom (and _safeMint) happens before critical state updates, with no reentrancy guard.
Describe the normal behavior in one or more sentences
When a whitelisted user calls mintNft(), the contract takes the required USDC collateral, increments the token counter, stores the collateral amount for that token, and safely mints a new NFT to the caller. If the collection isn’t revealed, the user isn’t whitelisted, the caller is the owner, or max supply is reached, it reverts.
Explain the specific issue or problem in one or more sentences
mintNft() makes an external call to usdc.transferFrom before it updates critical state, and then calls _safeMint, which can invoke user code via onERC721Received. A malicious token or receiver can reenter mintNft() during those external calls, allowing multiple mints in a single transaction and potentially bypassing supply or payment assumptions.
Likelihood:
Reason 1: Occurs when a caller’s usdc.transferFrom or the ERC721 receiver hook executes external code during mintNft() and that external code reenters the contract before the original call finishes.
Reason 2: Occurs when mintNft() is called by a contract that implements onERC721Received, so _safeMint triggers a callback into attacker‑controlled code before the function completes.
Impact:
ASupply bypass: single transaction can mint multiple NFTs, potentially exceeding MAX_SUPPLY or the intended one‑mint‑per‑call behavior.
** **Colatteral/accounting corruption: The collateral or internal counters (like tokenIdCounter) can be advanced unexpectedly, making later state inconsistent or enabling under‑collateralized mints
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.