Open hats-bug-reporter[bot] opened 1 year ago
Hello, Thanks a lot for your attention.
This issue is a configuration issue, we'll set up manually those timestamps by hand and verifiy that they are the same.
We have so to consider this issue as Invalid
Github username: @0xmuxyz Submission hash (on-chain): 0x748b570d274f8096f221fe7657e7a5354de09a4b783c01494e0368ec645ec312 Severity: medium
Description: Title:\ The owner may assign a stale timestamp into the
_startTimestamp
parameter due to lack of the input validationSeverity:\ Medium
Description:\ When the owner create a new vesting schedule, the owner call the VestingCvg#
createVestingSchedule()
.Within the VestingCvg#
createVestingSchedule()
, the_startTimestamp
would be assigned as a parameter. And then, it would be stored into thestartTimestamp
property of thevestingSchedules[nextVestingScheduleId]
storage like this: VestingCvg.sol#L173\ VestingCvg.sol#L205A timestamp, which is assigned into the
_startTimestamp
parameter when the VestingCvg#createVestingSchedule()
wold be called above, is supposed to be more advanced than the current timestamp (block.timestamp
).However, there is no input validation to check wether or not a timestamp, which is assigned into the
_startTimestamp
parameter, would be more advanced than the current timestamp (block.timestamp
).This lead to that the owner accidentally assign an stale timestamp into the
_startTimestamp
parameter and it would be stored into thestartTimestamp
property of thevestingSchedules[nextVestingScheduleId]
storage when the owner call the VestingCvg#createVestingSchedule()
above.Recommendation:\ Within the VestingCvg#
createVestingSchedule()
, consider adding an input validation to check wether or not a timestamp, which is assigned into the_startTimestamp
parameter, would be more advanced than the current timestamp (block.timestamp
) like this: