https://github.com/Cyfrin/2024-08-kitty-fi/blob/main/src/KittyPool.sol#L92-L95
The whiskdrawMeowllateral
function allows withdrawals before ensuring adequate collateral, which could result in fund loss.
The function whiskdrawMeowllateral
permits users to withdraw collateral before checking if they have enough remaining to cover their debt. This order of operations can lead to under-collateralization, where users could potentially withdraw more than they should, risking fund loss for both the user and the platform.
This vulnerability can lead to significant financial losses for users and could compromise the stability of the platform by allowing users to game the system.
Manual
Reorder the operations in whiskdrawMeowllateral
so that the collateral adequacy check happens before any withdrawal is processed, ensuring that users cannot withdraw more collateral than allowed.
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.