Skip to main content

MarketCapability

One action this market row supports, declared by the server. Render the CTA from this, not from lender knowledge — the same contract the earn rows use (/v1/data/earn capabilities[]).

The array is COMPLETE over the actions it models (today: refinance, set-mode): for those, absent means NOT OFFERED for this row and a client must not offer it. Actions outside that set say nothing about the row — they are not modelled here yet. Nothing about the underlying mechanism leaks into this shape: refinance on a Lista brokered market is a flash-loan composer bundle and on Exactly it is the protocol's own DebtManager, and a caller can tell neither apart, which is the point.

actionstring

refinance — move this market's debt into a different term without changing the assets or the size (called "roll-over" when the source is itself a fixed loan); builds at /v1/actions/loop/refinance.

set-mode — switch the ACCOUNT's active risk mode (Aave e-mode); builds at /v1/actions/lending/mode. Absent on lenders with no switchable mode — including LlamaLend, whose mode slot carries a BAND COUNT fixed at open, and every Morpho/Lista-shaped market, which has no mode at all.

Possible values: [refinance, set-mode]

parameterstring

Which parameter the action changes. rate (the Liquity family's interest-rate adjust) is the same verb on a third knob and appears here when built.

Possible values: [term, mode]

scopestring

What the change applies to. position — acts on ONE loan, which the caller must identify. account — one value for the whole (lender, chain, account); it is declared on every row of that lender because it is true of all of them, so a consumer showing one account-level control per lender should read it off any row rather than per market.

Possible values: [position, account]

endpointstring

The endpoint that builds this action.

Example: /v1/actions/loop/refinance
requiresstring[]

Params required BEYOND the universal set (marketUid, operator, amount). For refinance: termId (the TARGET term) — fromLoanId is optional by design, omitted means the float/dynamic position. For set-mode: lender, chainId and mode, since it is account-scoped and takes no market.

Example: ["termId"]
domainFieldstring

Which field on this row holds the allowed values for requires — never a second copy of it. terms is the published rate card; config is the risk-config map, whose KEYS are the mode ids and whose label is each mode's name.

Possible values: [terms, config]

MarketCapability
{
"action": "refinance",
"parameter": "term",
"scope": "position",
"endpoint": "/v1/actions/loop/refinance",
"requires": [
"termId"
],
"domainField": "terms"
}