Dive into the mechanics of protocol stability with the Liquidation Manager. This contract plays a vital role in maintaining the health of the Roots ecosystem by efficiently managing the liquidation of undercollateralized Troves. Discover the functions that trigger and process liquidations, and the events that signal these critical actions.

Functions

CCR()

Returns the current Collateralization Ratio of the system. (View)

function CCR() -> uint256 [view]

DEBT_GAS_COMPENSATION()

Returns the gas compensation amount for debt processing during liquidations. (View)

function DEBT_GAS_COMPENSATION() -> uint256 [view]

DECIMAL_PRECISION()

Returns the decimal precision used in calculations. (View)

function DECIMAL_PRECISION() -> uint256 [view]

PERCENT_DIVISOR()

Returns the divisor used for percentage calculations. (View)

function PERCENT_DIVISOR() -> uint256 [view]

batchLiquidateTroves

Liquidates a batch of specified Troves for a given Trove Manager.

function batchLiquidateTroves(troveManager: address (contract ITroveManager), _troveArray: address[]) [nonpayable]

borrowerOperations()

Returns the address of the IBorrowerOperations contract. (View)

function borrowerOperations() -> address (contract IBorrowerOperations) [view]

enableTroveManager

Enables a Trove Manager for liquidation operations.

function enableTroveManager(_troveManager: address (contract ITroveManager)) [nonpayable]

factory()

Returns the factory address. (View)

function factory() -> address [view]

liquidate

Liquidates a single specified Trove for a given Trove Manager.

function liquidate(troveManager: address (contract ITroveManager), borrower: address) [nonpayable]

liquidateTroves

Liquidates a maximum number of Troves for a given Trove Manager, up to a specified maximum Individual Collateralization Ratio (ICR).

function liquidateTroves(troveManager: address (contract ITroveManager), maxTrovesToLiquidate: uint256, maxICR: uint256) [nonpayable]

stabilityPool()

Returns the address of the IStabilityPool contract. (View)

function stabilityPool() -> address (contract IStabilityPool) [view]

Events

Liquidation

Emitted when a liquidation occurs, detailing the amounts of debt and collateral liquidated, and gas compensations.

event Liquidation(_liquidatedDebt: uint256, _liquidatedColl: uint256, _collGasCompensation: uint256, _debtGasCompensation: uint256)

TroveLiquidated

Emitted when a specific Trove is liquidated, including the borrower’s address, debt, collateral, and the operation type.

event TroveLiquidated(_borrower: address, _debt: uint256, _coll: uint256, _operation: uint8)

TroveUpdated

Emitted when a Trove is updated as a result of liquidation.

event TroveUpdated(_borrower: address, _debt: uint256, _coll: uint256, _stake: uint256, _operation: uint8)