mintNft() and buy() handle payments exclusively in USDC. These functions should not accept ETH since the contract has no use for it and no mechanism to return or withdraw it.
Both functions are marked payable, so they silently accept ETH alongside the USDC transfer. The contract has no withdraw, rescue, or receive function. Any ETH sent is permanently trapped.
Likelihood:
Every time a user sends ETH with a mintNft() or buy() call, the ETH is accepted and locked. Users who mistake the payment token will trigger this.
Impact:
All ETH sent to the contract is permanently lost. There is no admin function, no rescue mechanism, and no fallback to return it. The loss is proportional to the amount of ETH accidentally sent.
A user calls mintNft() with 0.5 ETH attached, expecting it might be the payment method. The function succeeds — USDC collateral is transferred, the NFT is minted. But the 0.5 ETH is now trapped in the contract. There is no withdrawEth() function. Neither the user nor the owner can recover it.
Remove the payable modifier from both functions. The contract only uses USDC for payments, so there is no reason to accept ETH. Removing payable makes the EVM revert any call that sends ETH, preventing accidental loss.
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.