The emergencyWithdraw function in the FeeCollector contract directly transfers fees to the Treasury contract using safeTransfer. This results in funds being permanently locked.
The emergencyWithdraw function in the FeeCollector contract directly transfers tokens to the Treasury contract using safeTransfer. This results in funds being permanently locked since the withdraw function in the Treasury contract can only extract assets that have been deposited through the deposit function.
In this emergencyWithdraw 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.
The impact of this vulnerability is significant as it allows funds to become permanently inaccessible within the Treasury contract.
Manual Code Review
Modify the emergencyWithdraw Function: Ensure that all transfers to the Treasury contract utilize the deposit function for appropriate fund handling.
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.