In UpliftOnlyExample contract the FeeData struct uses a field named blockTimestampDeposit which is intended to store timestamps. But during NFT transfers, the contract incorrectly stores block number in this field.
Contract UpliftOnlyExample uses following struct to keep track of deposits:
In addLiquidityProportional contract stores the current timestamp as expected:
However in afterUpdate contract will incorrectly store block number instead of timestamp:
Additional issues:
Not only wrong type of value (block number vs timestamp), but also wrong size cast:
Field is uint40
Cast is to uint32
The field name blockTimestampDeposit is misleading given it sometimes stores block numbers
Since field blockTimestampDeposit is not used in UpliftOnlyExample (apart from being stored), this is low severity. However it can negatively impact any other contract which is integrating with UpliftOnlyExample.
Manual review
Be consistent with timestamp usage.
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.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.