Users should always be able to withdraw their funds without interruption, even in the face of maintainer actions. However, there's a critical issue with KittyVault::executeWhiskdrawal
when the withdrawal request exceeds the available amount in the vault (totalMeowllateralInVault
). Consequently, this function reverts due to underflow or insufficient balance for the transfer.
The KittyPool::whiskdrawMeowllateral
function makes a call to KittyVault::executeWhiskdrawal
, but when there's insufficient collateral available, this function reverts. This issue arises because the withdrawal amount requested is higher than the actual amount available in the vault.
This flaw prevents users from withdrawing their funds when all collateral or more than the requested withdrawal amount is supplied to the Aave pool, disrupting normal operations and potentially causing financial loss.
The following test case illustrates the issue:
Manual Review
Implement logic in executeWhiskdrawal
to handle cases where the requested withdrawal amount exceeds totalMeowllateralInVault
. This can involve transferring additional collateral from the Aave pool if necessary.
Grant the pool contract access to the purrrCollateralFromAave
function alongside the maintainer, allowing for automated management of collateral supply and withdrawal.
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.