Market Creation
Lotus markets are created with MarketParams and bytes encoding IRM parameters and Liquidation Module parameters.
function createMarket(
MarketParams memory newMarketParams, // The MarketParams for the new market.
bytes calldata irmParams, // The parameters for the IRM.
bytes calldata liquidationParams // The parameters for the liquidation module.
) external
...
lastUpdate[id] = uint128(block.timestamp);
IIrm(newMarketParams.irm).initialize(id, irmParams);
ILiquidationModule(newMarketParams.liquidationModule).initializeMarket(id, liquidationParams);
...
}struct MarketParams {
address loanToken; // ERC-20 token for lending and borrowing
address irm; // IRM determines tranche borrow rates based on utilization
address liquidationModule; // Liquidation Module prices and executes liquidations
address[] collateralTokens; // Per-tranche collateral token
address[] oracles; // Per-tranche price oracle for loan health checks
uint128[] lltvs; // Per-tranche Liquidation Loan-to-Value
}Last updated