QuantAMM

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

Incorrect Storage and Assignment of Block Timestamp in UpliftOnlyExample::afterUpdate

Summary

The blockTimestampDeposit field in feeDataArray in line 610 is intended to store the block.timestamp, representing the time like in line 257. However, the current implementation stores block.number in a uint32 field. This introduces a semantic mismatch

Vulnerability Details

The blockTimestampDeposit field suggests that it is meant to store the timestamp of a transaction. However, the implementation assigns block.number instead, causing logical inconsistencies.

Impact

Informational

Tools Used

Manual Code Review

Recommendations

Replace the assignment of block.number with block.timestamp to ensure semantic correctness and replace uint32 with uint40:

- feeDataArray[tokenIdIndex].blockTimestampDeposit = uint32(block.number);
+ feeDataArray[tokenIdIndex].blockTimestampDeposit = uint40(block.timestamp);
Updates

Lead Judging Commences

n0kto Lead Judge 4 months ago
Submission Judgement Published
Validated
Assigned finding tags:

finding_afterUpdate_blockNumber_instead_of_timestamp

Likelihood: Medium/High, any NFT transfer will change this variable. Impact: Informational/Very Low. This variable is unused and won’t impact anything, but the array is public and its getter will return a variable with inconsistencies.

Support

FAQs

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