Docs

List RCF thresholds

Public API

RCF thresholds that Midnight markets must set to be accepted by the Morpho mempool: the latest threshold of each chain, loan token and LLTV tier, including thresholds published before they take effect.


GET
/v0/midnight/contracts/rcf-thresholds

Use this before creating a market. A market's rcf_threshold is part of its id. Find the row for the market's chain, loan token and lltv, the highest LLTV among its collaterals other than the loan token. The mempool enforces a row from its start; before a future start, it applies the key's earlier threshold, which this route does not list, or rejects the market when there is none. A row can also be published before the mempool admits its loan token: check the loan_token rules of GET /v0/midnight/mempool/rules.

Filters. chain_ids is required when loan_tokens is provided; lowercase addresses are checksummed. A loan token or LLTV without thresholds returns no rows.

Pagination. Response envelope: { cursor, data }, ordered by chain id, loan token and LLTV, with at most limit rows a page (1000 by default and at most). Pass cursor back verbatim with the same filters for the next page; a null cursor means the last page. A cursor issued before the thresholds changed returns INVALID_CURSOR: restart from the first page.

Cache. public, max-age=300.

Query Parameters

chain_ids?array<>

Filter by chain ids. Supported chains: Ethereum (1), Base (8453), Arc (5042), Robinhood Chain (4663), Tempo (4217), and Arbitrum (42161). Required when loan_tokens is provided.

Itemsitems <= 100
loan_tokens?array<string>

Filter by loan token addresses. Combine with chain_ids; lowercase input is checksummed.

Itemsitems <= 100
lltvs?array<>

Filter by the market's highest LLTV among its collaterals other than the loan token, WAD-scaled. A value that is not a Midnight LLTV tier matches no rows.

Itemsitems <= 100
limit?integer

Maximum number of items to return, at most 1000.

Range1 <= value <= 1000
Default1000
cursor?string

Opaque cursor from a previous page response, sent with the same filters.

Length1 <= length <= 4096

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/v0/midnight/contracts/rcf-thresholds"
{  "cursor": null,  "data": [    {      "chain_id": 8453,      "loan_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",      "lltv": "860000000000000000",      "rcf_threshold": "3000000000",      "start": 1783436400    },    {      "chain_id": 8453,      "loan_token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",      "lltv": "915000000000000000",      "rcf_threshold": "5000000000",      "start": 1783436400    }  ]}

{  "error": {    "code": "VALIDATION_FAILED",    "message": "Validation failed",    "details": [      {        "code": "invalid_type",        "message": "Expected number, received string",        "path": [          "chain_ids",          0        ]      }    ],    "request_id": "f0e1d2c3-b4a5-4968-8728-1c0d1e2f3a4b"  }}

{  "error": {    "code": "INTERNAL_ERROR",    "message": "Internal server error",    "details": null,    "request_id": "f0e1d2c3-b4a5-4968-8728-1c0d1e2f3a4b"  }}