QuantAMM

QuantAMM
49,600 OP
View results
Submission Details
Severity: low
Invalid

The `_nextTokenId` variable in the `UpliftOnlyExample` contract is not used anywhere in the project.

Summary

The _nextTokenId variable in the UpliftOnlyExample contract appears to be unused throughout the project.

Vulnerability Details

As the name suggests, the _nextTokenId variable is intended to store the ID of the next NFT to be minted in the UpliftOnlyExample contract. However, it is neither assigned a value nor utilized to store the intended data.

https://github.com/Cyfrin/2024-12-quantamm/blob/a775db4273eb36e7b4536c5b60207c9f17541b92/pkg/pool-hooks/contracts/hooks-quantamm/UpliftOnlyExample.sol#L89

// NFT unique identifier.
uint256 private _nextTokenId;

Impact

As a result, the contract will lose track of the NFT count, fail to monitor the minted NFTs, or potentially mint NFTs with incorrect token IDs in the UpliftOnlyExample contract.

Tools Used

Manual Review

Recommendations

  1. To ensure the proper functioning of the contract and the project, the _nextTokenId variable should be utilized in the appropriate locations to accurately track and manage the minting process.

  2. If redundant remove them from the contract to save gas and misinformations.

Updates

Lead Judging Commences

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

Informational or Gas / Admin is trusted / Pool creation is trusted / User mistake / Suppositions

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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

Give us feedback!