Skip to main content
POST
Builds the setIdentityGates transaction that installs, replaces or clears the market’s borrower register and provider register in one call. The wallet holding DEFAULT_ADMIN_ROLE on the market signs it. The same POST with txHash verifies the mined transaction and records it. The borrower register gates openLoan and borrowMore on the market. The provider register is read by every registered vault before it admits a depositor, because the market itself takes direct deposits only from the operator wallet and registered vaults. Get Identity Gates describes both doors in full.
A change applies from the next open, draw, vault deposit or share transfer. Existing loans and vault holdings are not examined again, and repaying, closing and redeeming are never gated.

Choose What Each Side Gets

Each field is read on its own:
  • Omitted: the market keeps the register it has now.
  • An address: that register is installed.
  • null, an empty string or the zero address: the register is cleared, and the side is left without one.
Sending only borrowerRegistry therefore changes the borrower side and leaves the provider side as it is.

Registers That Must Stay

A MARKET-priced market must keep a borrower register. The API refuses to clear it with IDENTITY_REGISTRY_REQUIRED, and the contract would revert the same change. On a current market the provider register can be cleared, since the market takes no third-party deposit that it would guard. On an older market whose pool is open to third-party providers, the API refuses to clear the provider register with IDENTITY_REGISTRY_REQUIRED. details.field names the side in both cases. A market on the earlier single-register implementation examines both sides through one register and cannot change it. It is refused with MARKET_UPGRADE_REQUIRED until the admin moves it onto the current implementation with Upgrade Market.

Checks Before the Calldata

Every register named is probed first. One that cannot be reached is refused with IDENTITY_REGISTRY_UNREADABLE, and one that does not answer isVerified(address) with IDENTITY_REGISTRY_INCOMPATIBLE, because as a gate it would refuse every party. ERC-3643 identity registries, ONCHAINID-based registers and the Trusset register all answer. A request that would leave both registers as they are is refused with IDENTITY_GATES_UNCHANGED rather than answered with a transaction that only costs gas. There is no unchanged: true response on this endpoint.

Path Parameters

string
required
Market ID.

Body Parameters

string
The borrower register to install, or null, "" or the zero address to clear it. Omit it to keep the current one. An address must be 0x followed by 40 hex characters, all-lowercase or with a valid EIP-55 checksum.
string
The provider register to install, or null, "" or the zero address to clear it. Omit it to keep the current one. Same address rules as borrowerRegistry.
string
Hash of the mined transaction, as a 0x-prefixed 64-character hex string. Send it to confirm; the registers are then read from the chain, so the other fields are not needed. Omit it to receive the calldata.

Response Fields

The calldata response:
object
The four signer fields are absent when the role lookup itself fails. The confirmed response:
object
Confirming records an IDENTITY_GATES_SET transaction on the market, visible through List Transactions, once per transaction hash.

Error Codes

Refusals from the checks above carry details as an object: field for the side concerned, and registry on IDENTITY_REGISTRY_INCOMPATIBLE. IDENTITY_GATES_UNCHANGED carries the two registers the market already has. Confirming with txHash can also return any transaction verification error, with the status listed there.