StabilityPool.liquidateBorrower is not called the lendingPool.updateState() at the start of the function caused lendingPool.getUserDebt(userAddress) to return user debit not relavant to current time. So incorrect debt amount is returned.
The lendingPool.updateState() function is not called at the start of the function.
This is LendingPool.getUserDebt . It returned the user total debit amount to last updated borrowed interest. not for current time. To get the borrowed interest relavant to current time , lendingPool.updateState() should be called at start of the function.
Also lendingPool.getUserDebt(userAddress) returns the user debit to last updated index. it again multiply by last updated index. Meaning double conversion done. Its unnessary here.
User debit is less , so it caused less crvUSDToken approval to lending pool . Since here its updated interest rates which casused higher user debit compared to approval debit amount. So this transfer function is reverted due to less approval amount causing liquidation is failed.
Due to this double conversion , it might approve the higher debit amount than actual debit amount , but it should not be happend as always. Consider this senario : The index was last updated a long time ago, making the double conversion result in a smaller total debit compared to updating it to the current time. So Better follow the correct calculations.
Manual Review
Call lendingPool.updateState() function at the start of the function. Also fix the double converison of debit calculation.
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.