QuantAMM

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

blockTimestampDeposit is using diff types when saving data

Description

There's a type inconsistency in the UpliftOnlyExample contract where blockTimestampDeposit is declared as uint40 in one instance but assigned a uint32 value in another. This inconsistency could lead to maintenance issues, confusion and potential loss if block.number is higher number.

// In FeeData struct
blockTimestampDeposit: uint40(block.timestamp)
// In afterUpdate function
feeDataArray[tokenIdIndex].blockTimestampDeposit = uint32(block.number);

Recommendation

Standardize the type usage to uint40 throughout the contract:

feeDataArray[tokenIdIndex].blockTimestampDeposit = uint40(block.number);
Updates

Lead Judging Commences

n0kto Lead Judge 7 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.