Trick or Treat

First Flight #27
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Invalid

NFT id starts from 1

Summary

The starting point of NFT IDs is made equal to 1 in the constructor.

contract SpookySwap is ERC721URIStorage, Ownable(msg.sender), ReentrancyGuard {
uint256 public nextTokenId;
constructor(Treat[] memory treats) ERC721("SpookyTreats", "SPKY") {
nextTokenId = 1;

Impact

Changing the starting point of NFT IDs from 0 to 1 could indeed affect compatibility with certain wallets, marketplaces, or tools that expect NFT IDs to start from 0. Here are some key considerations:

  1. Standardization: Many NFT standards and libraries assume NFT IDs start at 0. Changing this could break compatibility with existing infrastructure .

  1. Wallet Support: Some wallets may have hardcoded assumptions about NFT ID ranges, potentially causing issues with displaying or managing NFTs with IDs starting from 1 .

  1. Marketplace Integration: Marketplaces often rely on standardized NFT implementations. Non-standard ID numbering could lead to difficulties in listing, trading, or transferring NFTs.

Recommendations

To mitigate these risks, it's generally recommended to stick with the widely adopted convention of starting NFT IDs at 0 unless there's a compelling reason to deviate from this standard.

Updates

Appeal created

bube Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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