The FeeCollector contract transfers raacToken to the Treasury contract using safeTransfer, but the Treasury contract does not automatically update its _balances and _totalValue state variables. This results in a mismatch between the actual token balance in the contract and the recorded balance, preventing the withdrawal of these funds.
The FeeCollector contract executes:
This transfers raacToken to the Treasury contract without calling its deposit function.
Since deposit is the only function that updates _balances[token] and _totalValue, the transferred funds are not reflected in the state variables.
The withdraw function in Treasury only allows withdrawals up to _balances[token]. Thus, any tokens sent directly from FeeCollector (or any other contract) remain inaccessible.
Permanent fund lock: Any raacToken transferred from FeeCollector to Treasury is effectively stuck and cannot be withdrawn.
Manual code review
Modify withdraw to consider the actual token balance instead of relying solely on _balances[token]
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.