The TokenManager::withdraw
function does not update the userTokenBalanceMap
after a user has withdrawn.
A user calls the TokenManager::withdraw
to withdraw their token's balance from the CapitalPool
contract but the function does not update the userTokenBalanceMap
mapping which stores the user balance.
A user can call the TokenManager::withdraw
multiple times since their balance is not updated until the CapitalPool
contract is drained.
Manual Analysis
Update the userTokenBalance
mapping after every withdrawal.
Valid critical severity finding, the lack of clearance of the `userTokenBalanceMap` mapping allows complete draining of the CapitalPool contract. Note: This would require the approval issues highlighted in other issues to be fixed first (i.e. wrong approval address within `_transfer` and lack of approvals within `_safe_transfer_from` during ERC20 withdrawals)
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.