Markets
Deploy Market
Deploy a lending market for an imported ERC-3643 security token
POST
Deploys a complete market in one factory transaction: the lending market, its price oracle, interest rate model, insurance fund, collateral adapter, and a liquidation router dedicated to this market with the market pre-authorized on it.
The market is deployed seeking a lender of record. It names no admin, no issuer and no collateral agent at deployment. Instead you nominate one or more
Confirming with
candidates, and the market stays inert until one of them takes the role. See Lender of record.
A collateral token can back several markets as long as they differ in collateral mode or in settlement asset. Deploying a second market for the same token, mode and borrow asset returns 409 MARKET_EXISTS.
Body Parameters
string
required
ERC-3643 security token accepted as collateral. Must already be imported into your instance, and must not be the same token as the borrow asset.
string
required
Opening collateral price as a decimal string with at most 18 decimal places, for example
"104.82". Must be greater than zero. Denominated in the borrow asset and parsed at its decimals, so a market settling in USDC accepts at most 6 decimal places here.array
required
Addresses nominated to become the market’s lender of record. Between 1 and 20 entries, none of them the zero address. A deployment with no candidate can never be adopted and would stay inert, so the field is rejected when empty.
string
default:"FREEZE"
FREEZE or CUSTODY. See Collateral Modes. Cannot be changed after deployment.string
default:"NAV"
NAV or MARKET. MARKET causes the contract to reject Dutch auctions and to raise the auction floor premium, and requires identityRegistry to be set. Cannot be changed after deployment.string
Settlement token (stablecoin) for the market. Any ERC-20 with 6 to 18 decimals, validated on-chain at deploy time. Omit to use USDC. Cannot be changed after deployment.
string
ERC-3643 identity registry for the collateral token, available on the imported token’s metadata. Required when
priceSource is MARKET, required in practice for CUSTODY mode, recommended for FREEZE. Defaults to the zero address, which leaves compliance checks unresolvable and reports authorization status as unknown.integer
default:"0"
Decimals to assume if the collateral token’s
decimals() cannot be read on-chain. Integer between 0 and 36.string
Hash of the transaction you broadcast for this operation. Send it to confirm the transaction and record the result. Omit it to receive the calldata.
Response Fields
WithouttxHash, the response is the unsigned factory transaction.
object
txHash returns 201 with the recorded market and its readiness state.
object
The uniqueness check is skipped when the existing market came from an earlier factory generation. A market that predates the lender-of-record model does not block a redeployment onto the current factory.
Error Codes
Confirming with
txHash can also return:
Confirming can also return any transaction verification error.
