In the afterUpdate
function, the blockTimestampDeposit
variable is assigned the current block number instead of the current block timestamp:
Although the incorrect assignment does not affect the current contract logic, it introduces confusion and potential maintenance issues.
Issue: The variable blockTimestampDeposit
is incorrectly assigned block.number
, which is not a timestamp.
Expected Behavior: If blockTimestampDeposit
is intended to track a deposit timestamp, it should be assigned block.timestamp
.
Time Tracking Inaccuracy: This can cause confusion or errors if the variable is used for time-based calculations in the future..
Code Redundancy: An unused variable introduces unnecessary complexity and confusion for developers maintaining the code.
While this issue does not currently affect functionality, it reflects poorly on the code’s clarity and maintainability.
If blockTimestampDeposit
is intended to track a deposit’s timestamp for future use:
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.