The Treasury contract's deposit function fails to properly validate and track token balances. This breaks fund conservation invariants, potentially leading to accounting discrepancies in the protocol's treasury where token balances are tracked. When a user deposits tokens, the contract updates both individual token balances and total value tracking. However, these updates can become inconsistent with actual token holdings. the internal balance tracking can become desynchronized from actual token holdings
The Treasury contract tracks deposits through two key mechanisms: /Treasury.sol#L25-L27
The contract blindly trusts that the transfer succeeded and updates internal accounting without verification.
The code assumed ERC20.transferFrom() would revert on failure, but:
Some tokens return false instead of reverting
The contract doesn't use SafeERC20
The balance tracking lacks reconciliation checks
The Treasury contract serves as the backbone of RAAC's financial infrastructure, managing protocol fees and revenue distribution. An attacker can exploit the deposit mechanism to create phantom balances, causing the entire reward distribution system to operate on false assumptions. /Treasury.sol#deposit
The main vulnerability lies in the unverified token transfer followed by unconditional state updates. This creates a potential desynchronization between actual token holdings and internal accounting.
We can see the function interacts with both FeeCollector.sol and the broader RAAC protocol's economic system, making its accounting accuracy crucial for protocol stability.
this is how the attact: An attacker interacts with the Treasury's deposit function, which blindly trusts token transfers without verifying actual balance changes. When the transfer fails silently, the Treasury still increments its internal accounting. This creates a divergence between reported and actual balances.
The consequences ripple through the protocol's core mechanisms:
This discrepancy affects the FeeCollector's distribution calculations, the GaugeController's boost parameters, and ultimately the veRAACToken holders' rewards.
The Treasury contract, designed to be the secure vault for protocol fees and revenue sharing (as outlined in the RAAC whitepaper section), can have its internal accounting completely desynchronized from reality.
This interacts dangerously with the FeeCollector's distribution system: /FeeCollector.sol#distributeCollectedFees
The RAAC protocol's entire fee distribution system (FeeCollector.sol) relies on accurate Treasury accounting. With this bug:
veRAACToken holders could receive incorrect reward calculations
The GaugeController's boost calculations become unreliable
The protocol's revenue sharing mechanism (80/20 split) breaks down
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.