The function at LendingPool::closeLiquidation()
is incomplete and allows anyone to avoid liquidations without repaying the debt.
The reason is very straightforward. The function does not call the _repay()
function, which is the one that actually repays the debt. This means that anyone can call closeLiquidation()
and avoid repaying the debt.
The function simply sets your isUnderLiquidation
to false
. The only worrying constrain is that your debt is not dust debt, but most of the cases won't. Effectively making any liquidatable user be able to save themselves without a cost.
There is also a grace period so users have enough time to save themselves if necessary, which only adds to how easy is for anyone to avoid liquidations.
See the function here:
Function is just wrong.
Users using it won't repay anything.
Anyone can cancel their liquidation without repaying, allowing for bad debt to exist and breaking the health of the system completely.
Add the _repay()
execution flow to the closeLiquidation()
function.
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.