IMidnightSupplyVaultSharesCallback
Git Source - Generated with forge doc
Inherits: ISellCallback
Title: IMidnightSupplyVaultSharesCallback
Interface of the callback that deposits loan tokens into a vault and supplies the shares as collateral.
Deposits sellerAssets + amountFromSeller of loan tokens into the vault and supplies the shares as
collateral, where amountFromSeller = ceil(sellerAssets * additionalDepositPercent / WAD).
Events
VaultSharesSupplied
event VaultSharesSupplied(
address indexed borrower,
bytes32 indexed marketId,
address indexed vault,
uint256 sellerAssets,
uint256 assetsDeposited,
uint256 sharesSupplied
);
Structs
CallbackData
Data encoded in the offer's callbackData.
struct CallbackData {
address vault;
uint256 collateralIndex;
uint256 additionalDepositPercent;
}
Properties
| Name | Type | Description |
|---|---|---|
vault | address | The ERC-4626 vault to deposit into (must be listed in market.collateralParams). |
collateralIndex | uint256 | The index of the vault in the market's collateralParams array. |
additionalDepositPercent | uint256 | The extra share of sellerAssets the seller must provide, in WAD (e.g. 0.1e18 = 10% extra). Must be at least WAD^2 / (price * LLTV) - WAD, where price = tickToPrice(offer.tick), to keep the position healthy; the callback does not enforce this minimum. |