A critical vulnerability in the withdrawal mechanism allows users to withdraw funds belonging to other users. This issue stems from the protocol's failure to decrease a user's balance after a withdrawal, enabling repeated withdrawals until the entire balance is depleted.
Users can withdraw more funds than they deposited.
Potential for complete drainage of the protocols balance.
Attacker deposits minimal required collateral.
Attacker creates and then aborts an offer.
Attacker calls withdraw function repeatedly.
Each withdrawal succeeds without reducing the attacker's balance.
Process continues until the contract is emptied.
this below is also the withdraw function without the protocol decreasing the withdrawed balance
implement code that will decrease the balance of a user each time someone withdraw his balance
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.