User can withdraw all the tokens from the capital pool.
Suppose a user creates an offer and have TaxIncomes or SalesRevenue. For example, when user withdraw TaxIncome from TokenManager contract, there's no initialize of TaxIncome in this function after sending funds. So user can withdraw so many times while capital pool has enough tokens.
Manual Review
Add initialize statement in the withdraw function of TokenManager.sol.
function withdraw(address _tokenAddress,TokenBalanceType _tokenBalanceType) external whenNotPaused {...userTokenBalanceMap[_msgSender()][_tokenAddress][_tokenBalanceType] = 0;emit Withdraw(_msgSender(),_tokenAddress,_tokenBalanceType,claimAbleAmount);}
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.