The functions purrrCollateralToAave
, purrrCollateralFromAave
, and purrgeBadPawsition
perform critical operations involving transferring collateral to and from the Aave protocol and purging bad positions. However, these functions do not confirm the success of the operations before updating the corresponding state variables.
The purrrCollateralToAave
and purrrCollateralFromAave
functions interact with the Aave protocol but do not check if the operations (supply, withdraw) succeeded before updating the contract's state variables as seen in the following code;
If the operations fail but the state variables are still updated, the contract's state will be inconsistent with the actual balances, leading to potential financial losses or vulnerabilities.
In purrgeBadPawsition
function the user's debt is reset to zero before the burn operation as seen in the following code. If the burn operation fails, the user's debt remains zero, which could lead to inconsistencies
If the operations fail but the state is updated, it can result in an incorrect representation of collateral and debt, leading to financial discrepancies and potential insolvency issues. Also the attackers could exploit this inconsistency by triggering state updates without actually transferring collateral, resulting in losses for the protocol and its users.
Manual Review
Implement checks to confirm the success of the operations before updating the state variables
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.