NFT Dealers

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

Misleading Natspec Comments on Fee Threshold Constants

Author Revealed upon completion

Description:
The comments on LOW_FEE_THRESHOLD and MID_FEE_THRESHOLD use European-style decimal notation that misrepresents the actual values:

// NFTDealers.sol:28-29
uint256 private constant LOW_FEE_THRESHOLD = 1000e6; // 1.000 USDC — actually $1,000 USDC
uint256 private constant MID_FEE_THRESHOLD = 10_000e6; // 10.000 USDC — actually $10,000 USDC

Code Reference:

  • src/NFTDealers.sol:28 — Comment says "1.000 USDC" but value is $1,000 USDC

  • src/NFTDealers.sol:29 — Comment says "10.000 USDC" but value is $10,000 USDC

Consideration:
Update comments to use unambiguous notation:

- uint256 private constant LOW_FEE_THRESHOLD = 1000e6; // 1.000 USDC
+ uint256 private constant LOW_FEE_THRESHOLD = 1000e6; // 1,000 USDC
- uint256 private constant MID_FEE_THRESHOLD = 10_000e6; // 10.000 USDC
+ uint256 private constant MID_FEE_THRESHOLD = 10_000e6; // 10,000 USDC

Support

FAQs

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

Give us feedback!