Admin

The Lotus admin, Lotus.owner(), has the authority to

  • setOwner(address): update the admin.

  • setFeeRecipient(address): sets protocol interest fee recipient.

  • enableIrm(address): allow an IRM implementation for new markets.

  • enableLltv(uint256): allow an LLTV value for new markets (0 < lltv ≤ 1e18).

  • enableLiquidationModule(address): allow a liquidation module for new markets.

  • setFee(marketParams, trancheIndex, newFee, irmData): set per‑tranche protocol fee (≤ 25%) and accrue first.

Setting Tranche Fees

The Lotus admin can update the fees on a created market. When the do interest is accrued for the entire market.

function setFee(MarketParams memory marketParams, uint256 trancheIndex, uint128 newFee, bytes calldata irmData) external
    onlyOwner
{
    ...
    if (newFee > MAX_FEE) revert LotusErrorsLib.InvalidFee(newFee);

    _accrueInterest(marketParams, id, irmData, 0);

    marketParams.fees[trancheIndex] = newFee;
    idToMarketParams[id] = marketParams;

    emit LotusEventsLib.FeeSet(id, trancheIndex, newFee);
}

Last updated