The createVestingSchedule function lacks validation to ensure that the provided startTime is greater than or equal to the current block timestamp (block.timestamp). This allows vesting schedules to start in the past, potentially disrupting the intended vesting logic.
There is no check to prevent setting startTime in the past.
A beneficiary could receive tokens immediately if a past startTime is set, violating the intended vesting schedule.
The issue can be exploited by setting startTime to a very old timestamp, effectively bypassing the vesting delay.
Vesting schedules could start retroactively, leading to immediate or unintended token release.
It could create discrepancies in token distributions and cause inconsistencies in the vesting logic.
If the vesting mechanism assumes a future startTime, its functionality may be compromised.
Manual code review
Functional analysis
Add a validation check to ensure startTime is not in the past:
Implement unit tests to verify that the function reverts when startTime is set in the past.
Consider logging an event if an invalid startTime is attempted, to track incorrect input attempts.
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.