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
Accrues interest for only the
trancheIndexRetrieves the price from the oracle, and verifies the loan is unhealthy
require(!_isHealthy(...))Has the Liquidation Module calculate the amount of
seizedAssetsandrepaidSharesliquidationModule.calculateLiquidation().Updates the borrower's
Position.Calculates
badDebt. IfbadDebt > 0, thenaccrueInterest()for the entire market, and cascade thebadDebtto tranches[trancheIndex, numTranches)based ontrancheSupplyUtilization.Approves
collateralTokento the Liquidation ModuleHas the Liquidation Module execute the liquidation, typically transferring
collateralTokento the liquidator immediatelyliquidationModule.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