Eggstravaganza

First Flight #37
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Invalid

[GAS] Redundant totalSupply in EggstravaganzaNFT

Summary:

The contract EggstravaganzaNFT.sol maintains a redundant totalSupply counter.

Vulnerability Details

The contract tracks:

uint256 public totalSupply;

But ERC721 already tracks ownership through _owners mapping, making this duplicate state.

Impact

Low - Gas inefficiency but no security impact.

Tools Used

Manual Review

Recommendations

  1. Remove totalSupply unless explicitly needed

  2. If needed for off-chain queries, consider making it immutable after minting

  3. Use balanceOf or token enumeration if supply info is needed

Updates

Lead Judging Commences

m3dython Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Gas optimization

Strategy to save gas and minimize transaction costs

Support

FAQs

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