A critical vulnerability has been identified in the TokenManager::withdraw function, where users are able to withdraw their tokenBalances
multiple times without restrictions. This flaw allows malicious users to repeatedly drain the pool of tokens held by the Capitol contract, leading to significant financial loss and the potential collapse of the contract’s liquidity.
The tokenBalance are not been subtracted after the transfer has been made.
This loophole enables a single user to deplete the contract’s reserves completely, potentially leaving other users unable to access their legitimate funds. This can lead to the collapse of the contract’s intended functionality and cause significant financial loss to the platform and its users.
Manual Review
The userTokenBalanceMap should be updated after every withdrawal is made
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.