Function: liquidateTroves(IERC20 collateral, uint256 maxTrovesToLiquidate, uint256 maxICR)
Liquidate a sequence of troves.
Inputs
collateralControl: Fully controlled.
Constraints: Should be a valid collateral.
Impact: Collateral type to perform liquidations against.
maxTrovesToLiquidateControl: Fully controlled.
Constraints: No constraints.
Impact: The maximum number of troves to liquidate.
maxICRControl: Fully controlled.
Constraints: No constraints.
Impact: Maximum ICR to liquidate.
Branches and code coverage (including function calls)
Intended branches
Liquidate all the troves that can be liquidated with ICR <= maxICR.
Break from normal liquidation if ICR >= MCR and try to perform liquidation in recovery mode.
Negative behavior
Revert if wrong collateral is used.
Revert if there are no troves that can be liquidated.
Function call analysis
troveManager.updateBalances()What is controllable? N/A.
If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
troveManager.getTroveOwnersCount()What is controllable? N/A.
If return value controllable, how is it used and how can it go wrong? Return value is not controllable.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
troveManager.fetchPrice()What is controllable?
N/A.If return value controllable, how is it used and how can it go wrong? Return value is not controllable.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
stabilityPoolCached.getTotalDebtTokenDeposits()What is controllable? N/A.
If return value controllable, how is it used and how can it go wrong? Return value is not controllable.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
troveManager.sunsetting()What is controllable? N/A.
If return value controllable, how is it used and how can it go wrong? Return value is not controllable.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
troveManager.getCurrentICR(account,price)What is controllable? N/A.
If return value controllable, how is it used and how can it go wrong? Return value is not controllable.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
borrowerOperations.getGlobalSystemBalances()What is controllable? N/A.
If return value controllable, how is it used and how can it go wrong? Return value is not controllable.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
stabilityPoolCached.offset(address(collateral), totals.totalDebtToOffset, totals.totalCollToSendToSP)What is controllable?
collateraladdress.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
troveManager.decreaseDebtAndSendCollateralWhat is controllable? N/A.
If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.
troveManager.finalizeLiquidationWhat is controllable?
msg.sender.If return value controllable, how is it used and how can it go wrong? N/A.
What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.