Skip to main content

ILendMidnightRenewalCallback

Git Source - Generated with forge doc

Inherits: IBuyCallback

Title: ILendMidnightRenewalCallback

Interface of the callback that renews lender positions between Morpho Midnight markets.

Events

LendRenewed

event LendRenewed(
address indexed lender,
bytes32 indexed sourceMarketId,
bytes32 indexed targetMarketId,
uint256 assets,
uint256 fee
);

Structs

CallbackData

Data encoded in the offer's callbackData.

The source market must not be the target market: withdrawing from and lending into the same market can lead to unexpected accounting behavior.

struct CallbackData {
Market sourceMarket;
uint256 feeRate;
address feeRecipient;
uint256 tick;
}

Properties

NameTypeDescription
sourceMarketMarketThe Midnight market to withdraw from (where the lender has credit).
feeRateuint256The share of interest taken as fee, in WAD (e.g. 0.01e18 = 1%), denominated in loan token assets.
feeRecipientaddressThe address receiving the fee; address(0) does not disable the fee, only feeRate == 0 does.
tickuint256Must be set exactly equal to offer.tick; the callback does not enforce this equality. A mismatch mis-scales the fill and may revert or settle on unintended terms.