Skip to main content

MidnightFinalizeRequest

Body for POST /v1/actions/midnight/finalize: the inputs echoed from /make plus the maker’s EIP-712 signature over typedData.

inputs objectrequired

Deterministic offer inputs. Returned verbatim by GET /v1/actions/midnight/make; POST them back unchanged to /v1/actions/midnight/finalize alongside the signature so the worker rebuilds the identical offer tree. Any tampering fails on-chain ratification.

chainIdstring
Example: 8453
lenderstring

MORPHO_MIDNIGHT_<id> lender key.

Example: MORPHO_MIDNIGHT_0xABC…
buyboolean

true = maker BUYS units (a lend offer / bid); false = maker SELLS units (a borrow offer / ask).

tickstring

Order-book tick the APR snapped to.

startstring
Example: 0
expirystring

Offer expiry, unix seconds.

maxAssetsstring

Maker-side size in loan-token units.

makerstring

Maker (offer owner) address.

signaturestringrequired

Maker signature over typedData (0x hex).

MidnightFinalizeRequest
{
"inputs": {
"chainId": "8453",
"lender": "MORPHO_MIDNIGHT_0xABC…",
"buy": true,
"tick": "string",
"start": "0",
"expiry": "string",
"maxAssets": "string",
"maker": "string"
},
"signature": "string"
}