List mempool rules
Returns admission rules and payload limits for the requested chains and policy snapshot. Follow the pagination cursor to retrieve every row.
liquidation_cursor gives the required cursor for every collateral on a chain, scaled by 1e18. max_lif gives the resulting maximum liquidation incentive factor for each LLTV. Validation reports cursor mismatches as max_lif issues.
min_offer_assets gives the exact minimum per loan token in raw units; min_offer_assets_usd gives the chain-level USD threshold. Validation keeps the min_offer_assets_usd issue with loan_token, min_assets, and an additive usd_threshold field. For offers sized in units, the minimum applies to assets converted at the offer tick with side-specific rounding.
Callback policy uses buy_empty_callback, sell_empty_callback, and either non_empty_callback or blue_callback. Empty callbacks use the zero address and 0x data. Validation reports the corresponding rule name when its check fails.
Rules with only type and chain_id have fixed meanings:
-
payload_frame: payload must be valid hex with a one-byte version and four-byte gzip length header. -
payload_gzip_length: the declared gzip stream must fit within the payload bytes. -
payload_abi_decode: decompressed bytes must be a canonical ABI offer list with valid offer fields. -
empty_payload: payload must contain at least one non-empty offer. -
duplicate_offer_hash: non-empty offers must not repeat the same offer hash. -
unsupported_chain: the request chain must be supported by the service. -
market_chain_mismatch: every offer must target the requested chain and its Midnight deployment. -
nonzero_collateral_token: at least one collateral, with no zero token addresses. -
collateral_order: collateral token addresses must be sorted ascending without duplicates. -
nonzero_oracle: every collateral oracle must be nonzero on every chain, including Anvil. -
offer_time_bounds: start < expiry <= market maturity. -
buy_zero_receiver_if_maker_is_seller: buy offers must set receiver_if_maker_is_seller to the zero address.
POST /v0/midnight/mempool/validate reports some of these rules under a different issue name: nonzero_collateral_token as collateral_token, nonzero_oracle as oracle, payload_compression as payload_decompression, and collateral_order, offer_time_bounds, and buy_zero_receiver_if_maker_is_seller as payload_abi_decode.
Payload size rules use bytes. The compressed limit covers the gzip stream only; decompressed and suffix limits are separate. max_offers_per_tree.max limits the number of payload entries, including empty padding entries.
Query Parameters
Optional ISO-8601 UTC timestamp. Uses the policy snapshot active at the latest 15:00 UTC boundary at or before this timestamp; omitted uses the current time.
Chain ID filter (comma-separated).
Rule type filter (comma-separated).
Maximum number of items to return (max 1000).
Opaque pagination cursor from a previous response.
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/v0/midnight/mempool/rules?timestamp=2026-06-01T16%3A00%3A00Z&chain_ids=1%2C8453&types=min_offer_assets%2Crcf_threshold%2Cliquidation_cursor%2Cmax_lif%2Cpayload_version&limit=100&cursor=eyJ0eXBlIjoibWF0dXJpdHkiLCJjaGFpbl9pZCI6MSwidGltZXN0YW1wIjoxNzMwNDE1NjAwLCJuYW1lIjoiZW5kX29mX25leHRfd2VlayJ9"{ "cursor": null, "data": [ { "type": "maturity", "chain_id": 1, "name": "end_of_next_month", "timestamp": 1764342000 }, { "type": "loan_token", "chain_id": 1, "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" }, { "type": "loan_collateral", "chain_id": 8453, "oracle": "0x4429112b3C00b40Cf295db81cfcdE39d7d5ADC1d", "lltv": "980000000000000000", "description": "A market's loan token may be supplied as its own collateral only when priced by the chain's fixed-price oracle at the loan-collateral LLTV, alongside at least one other collateral" }, { "type": "rcf_threshold", "chain_id": 8453, "loan_token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "lltv": "770000000000000000", "threshold": "2000000000" }, { "type": "liquidation_cursor", "chain_id": 8453, "liquidation_cursor": "300000000000000000" }, { "type": "max_lif", "chain_id": 8453, "lltv": "770000000000000000", "liquidation_cursor": "300000000000000000", "max_lif": "1074113856068743286" }, { "type": "buy_empty_callback", "chain_id": 1, "description": "Buy offers with empty callbacks are supported" }, { "type": "blue_callback", "chain_id": 8453, "factory": "0x7337f119Eca028bD39E0e543cEf71631D2333425", "description": "Buy offers may carry a BlueBuyCallback with canonical Blue market params as callback data; the callback must be registered by the published factory for the offer maker before the offer is submitted (verified post-admission at indexing)" }, { "type": "min_offer_assets_usd", "chain_id": 8453, "usd_threshold": "10", "description": "Offers must use a loan token with a configured minimum and be at least $10 of it" }, { "type": "min_offer_assets", "chain_id": 8453, "loan_token": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913", "min_assets": "10001480" }, { "type": "payload_frame", "chain_id": 8453 }, { "type": "payload_gzip_length", "chain_id": 8453 }, { "type": "payload_abi_decode", "chain_id": 8453 }, { "type": "empty_payload", "chain_id": 8453 }, { "type": "duplicate_offer_hash", "chain_id": 8453 }, { "type": "unsupported_chain", "chain_id": 8453 }, { "type": "market_chain_mismatch", "chain_id": 8453 }, { "type": "nonzero_collateral_token", "chain_id": 8453 }, { "type": "collateral_order", "chain_id": 8453 }, { "type": "nonzero_oracle", "chain_id": 8453 }, { "type": "offer_time_bounds", "chain_id": 8453 }, { "type": "buy_zero_receiver_if_maker_is_seller", "chain_id": 8453 }, { "type": "payload_version", "chain_id": 8453, "version": 1 }, { "type": "payload_compression", "chain_id": 8453, "max_bytes": 999739 }, { "type": "payload_decompression", "chain_id": 8453, "max_bytes": 6000000 }, { "type": "payload_suffix_too_large", "chain_id": 8453, "max_bytes": 256 }, { "type": "min_tick", "chain_id": 1, "min_tick": 495 }, { "type": "max_tick", "chain_id": 1, "max_tick": 6744 }, { "type": "tick_spacing", "chain_id": 1, "tick_spacing": 4 }, { "type": "ratifier", "chain_id": 1, "address": "0x0000000000000000000000000000000000000002" }, { "type": "collateral_lltv", "chain_id": 1, "allowed_lltvs": [ "385000000000000000", "625000000000000000", "770000000000000000", "860000000000000000", "915000000000000000", "945000000000000000", "965000000000000000", "980000000000000000", "1000000000000000000" ] } ]}{ "error": { "code": "VALIDATION_ERROR", "message": "Limit must be greater than 0.", "details": [ { "field": "limit", "issue": "Limit must be greater than 0." } ], "request_id": "req-123" }}{ "error": { "code": "VALIDATION_ERROR", "message": "Limit must be greater than 0.", "details": [ { "field": "limit", "issue": "Limit must be greater than 0." } ], "request_id": "req-123" }}