NFT Dealers

First Flight #58
Beginner FriendlyFoundry
100 EXP
Submission Details
Impact: high
Likelihood: high

`mintNFT` and `buy` methods are payable for no apparent reason

Author Revealed upon completion

Root + Impact

Description

mintNft() and buy() are both payable, which allow the callers to send ETH to the contract.

Risk

Even though the interaction of this contract assumes both buyers and sellers to transact in USDC, the payable modifier opens up the possibility for users to set msg.value and send ETH to the contract, with no refund mechanism. Even the contract owner would not be able to withdraw trapped ETH.

Recommended Mitigation

Remove payable modifiers from both mintNft() and buy() methods.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.

Give us feedback!