Skip to main content

IBorrowMidnightRenewalCallback

Git Source - Generated with forge doc

Inherits: ISellCallback

Title: IBorrowMidnightRenewalCallback

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

Events

BorrowRenewed

event BorrowRenewed(
address indexed borrower,
bytes32 indexed sourceMarketId,
bytes32 indexed targetMarketId,
uint256 repaidAmount,
address[] collateralsTransferred,
uint256[] collateralAmounts,
uint256 fee
);

Structs

CallbackData

Data encoded in the offer's callbackData.

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

Properties

NameTypeDescription
sourceMarketMarketThe Midnight market to exit.
feeRateuint256The share of the interest taken as fee, in WAD (e.g. 0.01e18 = 1% of the interest).
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.