Treasury contract's withdraw function fails to properly maintain value conservation during token withdrawals, and this breaks a fundamental invariant where total value should always match the sum of individual token balances. A manager with proper role access can trigger a withdraw operation that creates a discrepancy between the total value tracking and actual token balances. When the manager withdraws tokens, the contract updates individual token balances but fails to maintain proper synchronization with the total value tracking.
Exploit Path: A manager with MANAGER_ROLE
executes a withdrawal
Result
When managers withdraw tokens, the total value tracking desynchronizes from actual balances, similar to the famous Compound interest calculation bug, but with protocol-wide implications.
The Treasury contract, which acts as the financial backbone of the RAAC protocol. Like a central entity, it manages multiple token types. RAAC governance tokens, RTokens from lending operations, and DETokens from the stability system.
When a manager initiates a withdrawal, the contract attempts to update two critical values. the specific token balance and the total protocol value. There's dangerous desynchronization between these values. Imagine a bank where the main ledger shows a different amount than the sum of all account balances.
The core issue manifests in the withdraw function
In the state update section where balance and total value updates aren't atomically synchronized. This desynchronization cascades through the entire protocol. The GaugeController
relies on accurate Treasury values to calculate boost multipliers for veRAACToken
holders. When these values become misaligned, the entire incentive structure warps. A user's boost could be calculated incorrectly, leading to either inflated or diminished rewards.
This desynchronization could lead to:
Incorrect reporting of total protocol value
Potential over-withdrawal of funds
Breaking of dependent systems that rely on accurate total value tracking
Current Implementation of the withdraw() function
We require atomic updates with validation, this ensures the Treasury maintains perfect synchronization between individual token balances and total protocol value, preserving the integrity of RAAC's economic mechanisms.
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.