The RAACReleaseOrchestrator contract manages vesting schedules for RAAC tokens, allowing beneficiaries to receive tokens over time via a release function. However, the createVestingSchedule function fails to validate its startTime parameter. Without a check to ensure that startTime is in the future (or at least not in the past), an orchestrator can mistakenly (or maliciously) set a vesting schedule with a past start time. As a result, beneficiaries can immediately claim their entire vesting allocation by calling the release function—bypassing any intended vesting cliff or delay. This vulnerability can lead to a severe denial of service regarding the vesting mechanism, undermining the protocol’s intended token distribution schedule.
The createVestingSchedule function is defined as follows:
Key Issue:
Missing Start Time Check:
The function does not verify that the provided startTime is valid—that is, it does not ensure that startTime is not in the past relative to the current block timestamp. As a consequence, an orchestrator could set startTime to a value that has already passed, causing the entire vesting schedule to effectively become immediately active.
Immediate Vesting:
If the vesting schedule's startTime is set in the past, beneficiaries can call the release function immediately after schedule creation and claim all tokens meant to vest over time.
Bypassing Vesting Cliff:
Even if the protocol includes a vesting cliff elsewhere, a past startTime could negate its effect, allowing beneficiaries to bypass the intended delay and gain full access to vested tokens prematurely.
Setup:
An orchestrator creates a vesting schedule for beneficiary ALICE using a startTime that is set to block.timestamp - VESTING_DURATION, effectively putting the vesting schedule entirely in the past.
Immediate Release:
Since the vesting schedule is immediately active, when ALICE calls release(), the _calculateReleasableAmount function calculates that all tokens are available for release, and ALICE receives the full allocation at once.
Initialize a Foundry Project:
Place Contract Files:
Ensure that RAACToken.sol and RAACReleaseOrchestrator.sol are in the src/core/tokens and src/core/minters/RAACReleaseOrchestrator directories respectively.
Create Test Directory:
Create a test directory adjacent to src and add the test file (e.g., RAACReleaseOrchestratorTest.t.sol).
Run the Test:
Expected Outcome:
The test should show that ALICE is able to release the full vesting amount immediately due to the startTime being set in the past, thereby demonstrating the vulnerability.
Immediate Vesting Abuse:
Beneficiaries can bypass the intended vesting cliff or delay by creating a vesting schedule with a past start time, enabling them to claim all tokens immediately.
Denial of Vesting Control:
The protocol loses control over the vesting schedule, potentially leading to a rapid, unplanned release of tokens that could disrupt market stability.
Economic Exploitation:
Immediate vesting can be exploited by beneficiaries, undermining the vesting mechanism designed to align incentives over time.
Loss of Protocol Integrity:
Bypassing vesting rules may lead to unintended token supply increases, which can harm the economic balance and long-term trust in the protocol.
Manual Review
Foundry
To prevent beneficiaries from abusing the vesting schedule via an incorrect start time, update the createVestingSchedule function to include a validation check that ensures the startTime is not in the past. Additionally, update the beneficiary's vesting schedule to record the last claim time upon creation.
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.