The RAACReleaseOrchestrator
contract is responsible for managing the vesting and release of RAAC tokens. A critical issue has been identified regarding the handling of category usage metrics during the emergency revocation of vesting schedules. This report outlines the implications of this issue, the technical impact, and recommendations for remediation.
The emergencyRevoke
function does not update the categoryUsed
mapping when a vesting schedule is revoked. This oversight leads to orphaned allocations, which can create significant issues in the contract's financial management and reporting.
Zombie Allocations: When a vesting schedule is revoked, the tokens are returned to the contract, but the corresponding category usage metrics are not adjusted. This results in "zombie" allocations that cannot be reused for new vesting schedules, effectively blocking legitimate usage of the allocated tokens.
Distorted Financial Reporting: The failure to update the categoryUsed
mapping can lead to inaccurate financial reporting metrics. Stakeholders may be misled about the actual availability of tokens for allocation, impacting decision-making and trust in the contract.
Hidden Insolvency: The inability to accurately track category usage can enable hidden insolvency scenarios. If the contract appears to have more tokens allocated than it actually does (due to double-counting), it may lead to situations where the contract cannot fulfill its obligations, undermining its financial integrity.
The following code snippet from the emergencyRevoke
function illustrates the issue:
The test case test_EmergencyRevokeDoesntUpdateCategory
confirms that the categoryUsed
mapping is not updated upon revocation, leading to the orphaned allocation issue.
To address this issue, it is essential to update the categoryUsed
mapping during the revocation process. The following code snippet demonstrates how to implement this change:
The lack of updates to the categoryUsed
mapping during the emergency revocation of vesting schedules is a significant issue that can lead to orphaned allocations, distorted financial reporting, and potential hidden insolvency. Implementing the recommended changes will ensure accurate tracking of category usage and maintain the integrity of the contract's financial management. Addressing this issue is crucial for maintaining user trust and ensuring the contract operates as intended.
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.