Assessment reports>Prisma Finance>Threat Models>_liquidateNormalMode

Function: _liquidateNormalMode(ITroveManager troveManager, address _borrower, uint256 _debtInStabPool, bool sunsetting)

This internal function is invoked to perform a "normal" liquidation, where 100% < ICR < 110%.

Inputs

  • troveManager

    • Control: None.

    • Constraints: None.

    • Impact: The trove manager is used to determine the trove, move the pending balances and close it.

  • _borrower

    • Control: None.

    • Constraints: None.

    • Impact: The borrower address to be liquidated.

  • _debtInStabPool

    • Control: None.

    • Constraints: None.

    • Impact: Available debt in stability pool.

  • sunsetting

    • Control: None.

    • Constraints: None.

    • Impact: All debt is distributed if sunsetting is true.

Branches and code coverage (including function calls)

Intended branches

  • Should liquidate the trove in normal mode.

  • Trove should be closed after the liquidation.

Function call analysis

  • troveManager.getEntireDebtAndColl(_borrower)

    • What is controllable? _borrower.

    • If return value controllable, how is it used and how can it go wrong? Return values are not controllable.

    • What happens if it reverts, reenters, or does other unusual control flow? No reentrancy scenarios.

  • troveManager.movePendingTroveRewardsToActiveBalances(pendingDebtReward, pendingCollReward)

    • 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.closeTroveByLiquidation(_borrower)

    • What is controllable? _borrower.

    • 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.

Zellic © 2025Back to top ↑