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
| Name | Type | Description |
|---|---|---|
vault | address | The ERC-4626 vault to withdraw from. |
feeRate | uint256 | The share of the interest taken as fee, in WAD (e.g. 0.01e18 = 1% of the interest; WAD = 100%). |
feeRecipient | address | The address receiving the fee; address(0) does not disable the fee, only feeRate == 0 does. |
tick | uint256 | Must 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. |
morphoBlueMarketId | bytes32 | The Morpho Blue market id, used for indexing only. |