NFT Dealers

First Flight #58
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Valid

[I-1] Payable functions are not supposed to receive Ether

Payable functions are not supposed to receive Ether

Description

The 2 functions mintNft and buy are marked as payable, but they are not supposed to receive any Ether. All the payments are processed in USDC. The keyword can be removed to prevent users from sending Ether to the smart contract.

@> function mintNft() external payable onlyWhenRevealed onlyWhitelisted {
@> function buy(uint256 _listingId) external payable {

Recommended Mitigation

Remove the payable keyword:

- function mintNft() external payable onlyWhenRevealed onlyWhitelisted {
+ function mintNft() external onlyWhenRevealed onlyWhitelisted {
- function buy(uint256 _listingId) external payable {
+ function buy(uint256 _listingId) external {
Updates

Lead Judging Commences

rubik0n Lead Judge 16 days ago
Submission Judgement Published
Validated
Assigned finding tags:

accidental-eth-locking

Support

FAQs

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

Give us feedback!