The contract declares using SafeERC20 for IERC20 and uses usdc.safeTransfer or usdc.safeTransferFrom in most USDC movements.
buy() calls usdc.transferFrom directly and wraps it in a require on the return value, the same anti-pattern already present in mintNft(). For ERC20 tokens that return no boolean on transferFrom (non-compliant, void-returning tokens), the require causes Solidity 0.8 to attempt ABI-decoding empty returndata as bool, triggering a decoding revert rather than the intended "USDC transfer failed" message.
Likelihood: Low
Standard USDC always returns true on a successful transferFrom, so this causes no practical issue with the intended deployment token.
The risk only materialises if a non-standard ERC20 (returning void instead of bool) is used as the payment token at deploy time.
Impact: Low
With standard USDC the behavior is identical to safeTransferFrom.
With a void-returning token, Solidity 0.8 attempts to ABI-decode empty returndata as bool, reverting with a decoding error rather than "USDC transfer failed", making the failure harder to diagnose.
Two instances of this pattern exist in the contract (mintNft and buy), increasing code inconsistency and audit surface.
The inconsistency is visible by comparing buy() with the SafeERC20 calls in other functions:
For a token that returns void on transferFrom, Solidity 0.8 tries to ABI-decode the empty returndata as bool. This triggers a decoding revert rather than the intended "USDC transfer failed" string. SafeERC20.safeTransferFrom handles this correctly by checking returndata.length == 0 || abi.decode(returndata, (bool)).
Replace the raw require(usdc.transferFrom(...)) pattern in buy() with usdc.safeTransferFrom(), consistent with SafeERC20 usage throughout the rest of the contract. Apply the same fix to mintNft() (L-05).
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.