the withdraw
function allows the users to claim their tokens. the tokens amounts are being stored in the mappning userTokenBalanceMap
, however the function never updates this mapping on withdrawal, therefore, users will be able to withdraw multiple times.
the function
never updates the userTokenBalanceMap
mapping, so users can call this function as long as there are tokens in the contract.
this might cause severe loss of funds for all the protocol users.
manual review
update userTokenBalanceMap
while taking into consideration reentrancy attacks.
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.