Skip to main content
POST
Returns the transaction that takes a market’s lender-of-record role. The adopting institution names every party on the market, declares how seized collateral is realized, and approves the asset data version it reviewed. The factory does all of it in one transaction, signed by one of this instance’s verified wallets, and either every part lands or none does. See Lender of record.
Adoption is final: no path returns the market to seeking a lender of record. Every address in the terms receives its role in the same transaction. Check each one before signing. The saleRecipient is the fixed destination for seized collateral, and rotating it is not available through this API. Even the router admin can only rotate it through an announced, one-hour-delayed flow that is refused while any realization is in flight.
Three conditions must hold before anything is built:
  • Trusset approved this account to act as a lender of record. Otherwise 403 CURATOR_NOT_APPROVED.
  • One of this instance’s verified wallets is nominated on the market, or the market is open to claimants beyond its candidates. A claim on an open market takes two calls, see Claim an open market.
  • The market still seeks a lender of record.
Every condition the factory enforces on adoption is checked first, so a refusal here replaces a reverted transaction. Review the market with Get Queued Market before building. After the transaction mines, record it with Confirm Lender Role. Sign with the wallet in signer. It becomes the market’s operator wallet: it receives the fixed operator share of repaid interest and is one of the two kinds of depositor the market accepts directly. Rotate Operator Wallet changes it later.

Path Parameters

string
required
Market contract address, 0x followed by 40 hex characters. It must be a market of the v2 lending factory.

Body Parameters

Parties

Seven parties are required. Each is a checksum-valid address that is not the zero address. One wallet may hold several of them.
string
required
Receives DEFAULT_ADMIN_ROLE on the market and on its liquidation router, and owns the insurance fund.
string
required
Receives ISSUER_ROLE on the market and owns the interest rate model, so it governs the rate and term offering from here on. It also becomes the wallet that attests the market’s asset data.
string
required
Recorded as the pledgee on every collateral lock the market’s adapter makes. It carries no capability on the market, the adapter or the router.
string
required
Where seized collateral goes when it is withdrawn for sale. The collateral token must permit the delivery from the market’s router to this address, or the call is refused with SALE_RECIPIENT_NOT_ELIGIBLE.
string
required
Receives OPERATOR_ROLE on the market’s liquidation router, which drives settlement. Naming a wallet this instance holds lets settlement run through this API.
string
required
Owns the market’s price oracle.
string
required
Authorized as the oracle’s price signer. It is the only one: a market seeking a lender of record has no signer at all.

Realization and commitment

string
required
How seized collateral is turned into money on default: EXCHANGE_SALE, ISSUER_REDEMPTION or AUCTION.The price source limits the choice. EXCHANGE_SALE is available only on a MARKET-priced market, and AUCTION is refused there because such a market cannot run Dutch auctions. The declaration puts the path on the record before any loan exists. No contract logic branches on it.
string
default:"0"
Liquidity the lender of record declares for the market, as a decimal amount of the borrow asset. Parsed at the borrow asset’s decimals. The factory records it and emits it with the adoption. Nothing in the contracts enforces it.
integer
Ceiling on any fixed borrower rate the rate model owner can set later, in basis points. Integer, 1 to 50000. Once recorded it can only move down. Omit it to record no ceiling.On a FIXED market the ceiling must not be below the rate new loans are stamped with, or the adoption reverts on-chain. The API does not check this before building.

Registers and provisioning

string
Borrower register for a market that has none. Only a nominated wallet may bring one. It is ignored when the deployer already installed a register, which stands. A MARKET-priced market must end up with one.It must answer isVerified(address), as an ERC-3643 identity registry, an ONCHAINID-based register and the Trusset register all do. Omit it, or send the zero address, to adopt without one where the price source allows.
string
The register every vault on the market examines its depositors against. Installed when the market carries none. The deployer’s proposedProviderRegistry is a suggestion only: this field decides.
string
Wallet granted LIQUIDATOR_ROLE on the market in the same transaction. It can trigger a seizure and configure nothing. Omitted or zero on a TWO_REGISTERS market, the API names the signing wallet.
string
One of this instance’s own vaults, registered on the market as a just-in-time liquidity source with vault liquidity switched on. The vault must settle in the market’s borrow asset and be operated by the signing wallet. The vault’s own draw cap remains the one step left, signed by the vault operator.
providerRegistry, liquidator and vault need the current market implementation. A market on the earlier implementation, reported as SINGLE_REGISTER by Get Queued Market, refuses them with MARKET_UPGRADE_REQUIRED. It also needs a borrower register whatever its price source.

Asset data and open-market claims

string
The hash of the asset data version you reviewed, 0x followed by 64 hex characters. It must equal the issuer’s standing attestation, assetData.attested on Get Queued Market. The adoption then records the approval of exactly that version.
boolean
Send false to adopt without acknowledging any version. It takes effect only when assetDataHash is omitted.
string
Salt for an open-market claim, 0x followed by 64 hex characters. Omit it on the first call and the API generates one. Send the returned value, with identical terms, on the second call. A nominee does not need it.

Approve the asset data

A market that carries an issuer attestation cannot be adopted silently. Without assetDataHash, the call is refused with 422 ASSET_DATA_ACKNOWLEDGEMENT_REQUIRED, and error.details names the standing hash and version. Read the bundle with Get Asset Data Bundle, then send the hash you read. Send acknowledgeAssetData: false instead only if the adoption should approve no version. A hash that no longer stands is refused with 409 ASSET_DATA_STALE, with details.reviewed, details.standing and details.standingVersion. The issuer can still re-attest after the transaction is built. The factory then refuses the whole adoption on-chain, so a stale approval can never pass.

Claim an open market

When no wallet of this instance is nominated and the market is open, the first call returns a commitCuratorClaim transaction instead of the adoption. It announces a hash of the exact adoption call, so the terms stay private and transaction ordering cannot decide who takes the market. Only the wallet in signer can complete the claim.
1

Announce

Broadcast the returned commitCuratorClaim transaction. Keep claimSalt.
2

Wait

Wait claimDelaySeconds (10 minutes) from the announcement. Calling earlier returns 409 CLAIM_PENDING with the moment it becomes actionable.
3

Complete

Call this endpoint again with identical terms and the same claimSalt. It returns the acceptCuratorRole transaction. Broadcast it with signer, then confirm it.
The announcement lapses after claimWindowSeconds (72 hours) and its hash stays consumed. A later call returns 409 CLAIM_EXPIRED. Start again without claimSalt to receive a fresh one. Any change to the terms changes the announced hash, including a newly attested asset data version. The API then answers with a new commitCuratorClaim for the new terms, and the wait starts again. An open-market claimant is admitted by the borrower register the deployer installed. The API picks the first of this instance’s wallets, up to five, that the register verifies. None verified is 403 CANDIDATE_NOT_VERIFIED. A market with no borrower register cannot be claimed without a nomination (403 NOMINATION_REQUIRED), and a claimant cannot bring its own register.

Response Fields

The adoption transaction:
object
The claim announcement, on the first call of an open-market claim:
object

Error Codes

A malformed body is refused by its first offending field. The four INVALID_ codes below carry error.details naming that field.