Liquidations

Lotus protocol modularization liquidation policies.

The core Lotus contract is responsible for health checks, interest accrual, collateral approvals, position updates, and bad debt.

While the pricing of the liquidation and execution of the liquidation are left to a protocol approved Liquidation Module.

function liquidate(
    MarketParams memory marketParams,  // The market parameters.
    uint256 trancheIndex,              // The tranche index of the position to liquidate.
    address borrower,                  // The borrower to liquidate.
    bytes calldata irmData,            // IRM-specific data.
    bytes calldata lmData              // Liquidation module data containing encoded BaseLiquidationParams.
) external returns (uint256, uint256);

The liquidate() function

  1. Accrues interest for only the trancheIndex

  2. Retrieves the price from the oracle, and verifies the loan is unhealthy require(!_isHealthy(...))

  3. Has the Liquidation Module calculate the amount of seizedAssets and repaidShares liquidationModule.calculateLiquidation().

  4. Updates the borrower's Position.

  5. Calculates badDebt. If badDebt > 0, then accrueInterest() for the entire market, and cascade the badDebt to tranches [trancheIndex, numTranches) based on trancheSupplyUtilization.

  6. Approves collateralToken to the Liquidation Module

  7. Has the Liquidation Module execute the liquidation, typically transferring collateralToken to the liquidator immediately liquidationModule.executeLiquidation().

Liquidation Modules are expected to satisfy the following interface

Liquidation Modules can be enabled on the protocol by the Lotus admin.

Afterwards markets can be created with this Liquidation Module. Parameters for the liquidation module are passed in during market creation.

Last updated