IMidnightSupplyCollateralCallback
Git Source - Generated with forge doc
Inherits: ISellCallback
Title: IMidnightSupplyCollateralCallback
Interface of the callback that supplies collateral just in time when sell offers are filled.
Events
CollateralSupplied
event CollateralSupplied(address indexed borrower, bytes32 indexed marketId, uint256[] collateralAmounts);
Structs
CallbackData
Data encoded in the offer's callbackData.
struct CallbackData {
uint256[] amounts;
uint256 offerSellerAssets;
uint256 maxBorrowCapacityUsage;
}
Properties
| Name | Type | Description |
|---|---|---|
amounts | uint256[] | The collateral amounts to supply on a full fill, indexed by market collateral slot. Must match the market's collateralParams length; use 0 for slots with no deposit. |
offerSellerAssets | uint256 | Must be set exactly equal to offer.maxAssets; the callback does not enforce this equality. A mismatch mis-scales the fill and may revert or settle on unintended terms. |
maxBorrowCapacityUsage | uint256 | Cap on the borrower's debt as a fraction of its borrowing capacity after the supply, in WAD. Only meaningful in (0, WAD): 0 skips the check, and any value >= WAD never binds because Midnight itself enforces debt <= capacity at settlement. |