Skip to main content
An operator is the institution that holds a lending market’s lender-of-record role and runs the market. An issuer deploys a market without parties, and the market takes no loans until an operator adopts it. Only an institution Trusset approved as a lender of record can take the role through this API. This group covers the endpoints built for that institution. They find and review markets seeking a lender of record, take the role, and manage the roles on each market afterwards. Running an adopted market, including liquidation management, is documented in Lending.

Base Path

These are Lending API endpoints. Authentication, the response envelope, unsigned writes, rate limits and credits work as described in Lending. The queue endpoints that act on one market take its contract address, because a candidate usually does not record the market yet. After adoption, the /markets/{marketId} endpoints take the market ID that Confirm Lender Role returns.

Taking a market

Adoption is final. No path returns the market to seeking a lender of record, and every address in the adoption terms receives its role in the same transaction. Check each one before signing.
1

Find a market

List Queued Markets returns the markets this instance may take or is waiting on. Each row names its origin, and canAccept says whether this instance can take the market. List Pending Markets shows every market on the network still seeking a lender of record.
2

Review it

Get Queued Market covers the market, its offering, the terms status and the asset data the issuer attested. It describes the collateral token twice, as the chain reports it and as the issuer published it, and ends with a deterministic review.
3

Take the role

Accept Lender Role returns the adoption transaction. It names every party on the market, declares how seized collateral is realized, and approves the asset data version reviewed. The verified wallet that signs it becomes the market’s operator wallet. Claiming an open market without a nomination takes two transactions, announced and then completed after a delay.
4

Record it

Once the transaction mines, Confirm Lender Role records the market on this instance. The market.id it returns is the ID every /markets/{marketId} endpoint takes from then on.
5

Complete the handover

On a current market, adoption hands the oracle, rate model and insurance fund to their named owners in the same transaction. On a market from an earlier factory generation, each named owner must accept. Get Handover returns what is still outstanding.
The market then continues through the market lifecycle: authorize, configure, publish terms, price, fund and lend.

Roles

Roles sit on three contracts: the market, its liquidation router and its price oracle. Adoption grants each party named in its terms the matching role. Add or remove holders later with Set Access Role, and check any address with Get Access Role. The wallet that administers a role signs each change, and the same POST with txHash verifies the mined transaction.
Revoking MARKET_ADMIN or ROUTER_ADMIN from its last holder leaves that contract with no admin. Nobody could then grant its roles or upgrade it, and neither the contracts nor the API stop it.
Set Liquidator Role grants or revokes the role that starts liquidations. The liquidations themselves, their settlement, Dutch auctions and liquidation bots are in Lending.