The Treasury contract receives RAAC tokens distributed by the FeeCollector. However, these tokens are not properly accounted for since the Treasury contract only tracks tokens deposited through Treasury::deposit. As a result, RAAC tokens received via the FeeCollector distribution remain untracked and cannot be withdrawn, leading to permanent loss of these funds.
Problem description
In the FeeCollector::_processDistributions function, RAAC tokens are transferred to the Treasury contract directly instead of being deposited using Treasury::deposit. This means the _balances and _totalValue variables in the Treasury contract are not updated, leaving the transferred tokens effectively inaccessible.
Affected Code in FeeCollector::_processDistributions
Steps to reproduce
The FeeCollector::_processDistributions function transfers RAAC tokens directly to the Treasury contract.
The Treasury contract does not update its internal balance tracking mechanisms for these tokens.
These tokens are effectively locked in the Treasury contract as there is no way to withdraw them.
Funds permanently locked: RAAC tokens sent to the Treasury cannot be withdrawn due to missing balance tracking.
Inaccurate financial tracking: The Treasury balance does not reflect actual holdings, leading to inconsistencies in accounting.
Manual Review
Use Treasury::deposit Instead of Direct Transfers
Modify FeeCollector::_processDistributions to deposit tokens using Treasury::deposit rather than transferring them directly:
By implementing this fix, the Treasury contract will correctly track all RAAC tokens received, ensuring that they remain accessible for withdrawal and use.
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.