The RAACReleaseOrchestrator
contract contains a vulnerability in the emergencyRevoke
function, where the categoryUsed[category]
value is not decremented when a vesting schedule is revoked. This inconsistency in state management can lead to inaccurate tracking of category allocations, potentially causing the contract to reject valid new vesting schedules due to perceived over-allocation of a category.
The createVestingSchedule
function increments categoryUsed[category]
when a new vesting schedule is created, ensuring that the allocated amount is tracked correctly.
However, the emergencyRevoke
function does not decrement categoryUsed[category]
when a vesting schedule is revoked. This results in the revoked allocation being incorrectly counted as "used" even though the tokens are no longer allocated to the beneficiary.
Example Scenario:
Suppose the TEAM_CATEGORY
has a total allocation of 18,000,000 tokens.
A vesting schedule for 5,000,000 tokens is created for a team member, incrementing categoryUsed[TEAM_CATEGORY]
to 5,000,000.
Later, the vesting schedule is revoked via emergencyRevoke
, but categoryUsed[TEAM_CATEGORY]
remains at 5,000,000.
When attempting to create a new vesting schedule for 15,000,000 tokens, the contract incorrectly calculates the available allocation as 13,000,000 (18,000,000 - 5,000,000) instead of the correct 18,000,000, leading to the rejection of the new schedule.
If multiple vesting schedules are revoked, the categoryUsed[category]
value remains artificially high.
This can lead to the contract rejecting new vesting schedules for the category, even if there is sufficient allocation available.
The issue undermines the contract's ability to accurately manage and enforce category allocation limits.
The impact is High, the likelihood is Medium, so the severity is High.
Manual Review
In createVestingSchedule
function, it should record the category:
In emergencyRevoke
function, it should decrement categoryUsed[category]
by the unreleased amount of the revoked vesting schedule:
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.