Skip to main content

IBorrowMidnightToBlueCallback

Git Source - Generated with forge doc

Inherits: IBuyCallback

Title: IBorrowMidnightToBlueCallback

Interface of the callback that migrates borrower positions from Morpho Midnight to Morpho Blue.

Events​

BorrowMigratedMidnightToBlue​

event BorrowMigratedMidnightToBlue(
address indexed borrower,
bytes32 indexed sourceMarketId,
bytes32 indexed targetBlueMarketId,
uint256 debtRepaid,
uint256 debtBorrowed,
address collateralToken,
uint256 collateralMigrated,
uint256 fee
);

Structs​

CallbackData​

Data encoded in the offer's callbackData.

struct CallbackData {
MarketParams targetMarketParams;
uint256 feeRate;
address feeRecipient;
}

Properties

NameTypeDescription
targetMarketParamsMarketParamsThe Morpho Blue market to migrate to; its collateralToken is the collateral migrated.
feeRateuint256The fee rate on buyerAssets, in WAD (at most MAX_PERCENTAGE_FEE_RATE = 0.01e18 = 1%).
feeRecipientaddressThe address receiving the fee; address(0) does not disable the fee, only feeRate == 0 does.