The _processDistributions function in the FeeCollector contract directly transfers fees to the Treasury contract using safeTransfer. This results in funds being permanently locked.
The _processDistributions function in the FeeCollector contract does not utilize the deposit function of the Treasury contract when distributing fees. Instead, it directly transfers assets using safeTransfer. This oversight results in funds being permanently locked within the Treasury contract, as the withdraw function can only extract assets that have been deposited via the deposit function. Consequently, any fees sent directly to the Treasury will become inaccessible and unable to be withdrawn.
In this _processDistributions function, if the token has not been deposited into the Treasury contract via the deposit function, its corresponding balance in the _balances mapping will be zero. When attempting to call the withdraw function for this token, a revert will occur because the withdraw function checks the _balances mapping and finds that there are insufficient funds (i.e., zero balance) for the token requested.
leads to funds becoming permanently inaccessible within the Treasury contract. This could result in financial losses for users
Manual Code Review
Modify the _processDistributions Function: Ensure that all transfers to the Treasury contract utilize the deposit function for proper handling of funds.
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.