Skip to main content

ILendVaultToMidnightCallback

Git Source - Generated with forge doc

Inherits: IBuyCallback

Title: ILendVaultToMidnightCallback

Interface of the callback that redeems ERC-4626 vault shares to fund lender BUY offers.

Withdraws from the vault to fund a lender's BUY offer on Midnight when the offer is filled.

Events

VaultWithdrawn

event VaultWithdrawn(
address indexed lender,
bytes32 indexed targetMarketId,
address indexed vault,
uint256 assets,
uint256 sharesBurned,
uint256 fee
);

Structs

CallbackData

Data encoded in the offer's callbackData.

struct CallbackData {
address vault;
uint256 feeRate;
address feeRecipient;
uint256 tick;
bytes32 morphoBlueMarketId;
}

Properties

NameTypeDescription
vaultaddressThe ERC-4626 vault to withdraw from.
feeRateuint256The share of the interest taken as fee, in WAD (e.g. 0.01e18 = 1% of the interest; WAD = 100%).
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.
morphoBlueMarketIdbytes32The Morpho Blue market id, used for indexing only.