Description:
A maker can be able to withdraw other makers collateral because the protocol forgets to decrease the balance of a maker when collateral is withdrawed, so a maker can constantly called withdraw function until the whole protocol balance in the pool is finished. in Tadle a maker have to deposit collateral before he can create an offer , also the maker can choose to Abort the offer if he wishes to get his collateral back, now a bad actor can choose to deposit a collateral then create an offer and now abort the Ask offer and withdraw all funds in the tok
Impact:
protocols Balance can be fully wrecked by a bad actor leading to protocol total lost of funds
Proof of Concept:
user1(bad actor) deposit USDC token as collateral and create offer
another 10 users deposit USDC token as collateral too and create offer
user1 abort the ask offer and will now be ready to withdraw his collateral back
user1 keeps calling withdraw until all the funds in the contract is finished
Proof of Code:
Recommended Mitigation:
kindly decrease the collateral funds in the withdraw function whenever someone withdraw so that a user can only be able to withdraw only his funds
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.