The FeeCollector contract directly transfers tokens to the Treasury contract using safeTransfer, bypassing the deposit function of Treasury. This prevents the funds from being withdrawn later, leading to permanent locking of assets.
FeeCollector:: emergencyWithdraw
FeeCollector:: _processDistributions
The Treasury contract enforces strict fund management rules:
All deposits must go throughdeposit() to update internal tracking variables (_balances and _totalValue).https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/collectors/Treasury.sol#L46
Withdrawals rely on _balances to validate fund availability.https://github.com/Cyfrin/2025-02-raac/blob/89ccb062e2b175374d40d824263a4c0b601bcb7f/contracts/core/collectors/Treasury.sol#L64
The FeeCollector contract directly transfers tokens to the Treasury address without invoking deposit(). This results in:
_balances and _totalValue not being updated.
Tokens existing in the Treasury contract but being unretrievable through withdraw().
Funds transferred via FeeCollector::distributeCollectedFeesand FeeCollector::emergencyWithdraw are permanently locked in Treasury, making them inaccessible.
Manual
Modify FeeCollector to use Treasury.deposit() instead of safeTransfer.
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.