When TokenManager::Withdraw is called, if the output token == wrappedNativeToken the call is passed to TokenManager::_transfer, which in turn, in the absence of the required allowance from CapitalPool calls CapitalPool::approve.
However, consider CapitalPool::approve.
Note that it always goes to the last address of the tokenManager, which is obtained from the call address tokenManager = tadleFactory.relatedContracts( RelatedContractLibraries.TOKEN_MANAGER );
Therefore, if suddenly the address of the tokenManager contract changes (a new contract is created), users whose funds were stored at the address of the old one will not be able to withdraw, as the allowance for the old token manager will remain 0.
Severity: medium
Manual Review
Add the ability to get allowance to old tokenManager contract addresses
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.