Skip to main content
POST
Builds the transaction that adds a vault to the market’s draw list (registerVault) or removes it (deregisterVault). The market admin, the wallet holding DEFAULT_ADMIN_ROLE, signs it. Registering is the market’s admission of the vault as a liquidity provider. A current market takes deposits directly from only two callers, the operator wallet and its registered vaults. A registered vault is therefore how outside money reaches the pool: investors deposit into the vault, and the vault’s own gate examines them. A registered vault funds nothing on its own. The switch must be on through Set Vault Liquidity, and the vault operator must set a draw cap for this market in the Issuer Portal. Get Vault Liquidity shows every leg. Deregistering stops further draws and withdraws the vault’s admission as a provider. The position the vault already holds is untouched. It is ordinary pool liquidity and leaves the way any provider’s does.

Path Parameters

string
required
The market’s record ID, as id on List Markets, not its contract address. See Market IDs.
string
required
register to admit the vault, deregister to remove it. No other value is accepted.

Body Parameters

string
required
The vault contract, 0x followed by 40 hex characters. A mixed-case address must pass its EIP-55 checksum, and an all-lowercase one always does. The zero address is refused.

What is checked before the transaction is built

Registration runs these checks in order. Deregistration runs none beyond the address format.
  1. The address must be a vault created by the v2 vault factory, otherwise the call is refused with NOT_A_VAULT. When the factory cannot be read, this check is skipped.
  2. The vault must settle in the market’s borrow asset, otherwise the call is refused with ASSET_MISMATCH. When either asset cannot be read, the call is refused with MARKET_STATE_UNAVAILABLE.
  3. The market’s implementation must be readable, otherwise the call is refused with MARKET_STATE_UNAVAILABLE.
  4. On a market still running the earlier single-register implementation, the vault must be verified on the market’s identity registry, otherwise the call is refused with IDENTITY_NOT_VERIFIED, or with IDENTITY_GATE_RETIRED when that registry is the previous Trusset ID Register. A vault whose admission to that registry is waiting for removal is refused with ELIGIBILITY_REMOVAL_PENDING.
  5. On a MARKET-priced market, the borrower register must qualify as a professional gate, otherwise the call is refused with PROFESSIONAL_BORROWER_GATE_REQUIRED. See Professional borrowers.
  6. The vault’s investors must meet the market’s provider gate, read live from the vault and the market. See Provider gate.
Neither call checks the current draw list. Registering a vault already on it, or deregistering one that is not, reverts on-chain. Registration does not check who operates the vault either. A vault run by someone other than this market’s lender of record can be registered. It stays inert, because its operator can never set a cap for this market.

Provider gate

A vault examines its depositors against its own register, when it has one, and against the provider register of every market it funds. On the current vault implementation, a vault without a register of its own adopts the provider register of the first market it funds or consents to draw for, and keeps it for good. A vault that no register examines takes no deposit at all. Registration therefore admits a vault only where those registers agree:
  • A vault with its own register can be registered on a market whose provider register is that same register, or that names none. Otherwise PROVIDER_GATE_MISMATCH.
  • A vault without a register of its own needs the market to name a provider register, or DEPOSITOR_GATE_REQUIRED. Unless the vault already funds this market, that register must be the one the vault adopted. A vault that has adopted none yet needs it to be the provider register of every market it funds or has consented to draw for. Otherwise PROVIDER_GATE_MISMATCH.
  • A vault without a register of its own that has adopted none, funds no market and still has shares in issue cannot be registered until its holders have redeemed, because nothing records which register they were examined against. It is refused with PROVIDER_GATE_MISMATCH.
The vault contract holds its operator to the same rule when funds are allocated or a draw cap is set, so a vault registered against it could never be funded from. The message names each register, and the verification profile of your instance or the whitelist behind it when there is one.

Draw order

The market draws on its registered vaults in the order they were registered. Deregistering a vault moves the most recently registered vault into the freed position, and a vault registered again joins at the end.

Check the result

This API has no confirm call for registration. A well-formed txHash in the body is ignored and the call answers with calldata again. A malformed one is refused with VALIDATION_ERROR. Once the transaction is mined, look for the vault in registeredVaults on Get Vault Liquidity.

Response Fields

object
A market still seeking a lender of record has no admin, so this call is refused with MARKET_PENDING_CURATOR before any registration check runs. When heldByThisInstance is false, a transaction signed by an instance wallet reverts on-chain. Hand the calldata to the wallet the lender of record placed DEFAULT_ADMIN_ROLE with.

Error Codes