Skip to main content
POST
Builds the transaction that grants or revokes one of six roles across the market’s three contracts: the market itself, its liquidation router and its price oracle. The endpoint never submits it. The wallet that administers the role signs, 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, and neither the contracts nor this endpoint stop it. Nobody could then grant its roles or upgrade it. On the market, nobody could pause it or write off a timed-out liquidation either.

Roles

An authorized price signer can move the price every loan in the market is valued at, within the oracle’s deviation bound. The oracle owner can sign prices without a grant, so revoking ORACLE_SIGNER from the owner is refused with ORACLE_OWNER_SIGNS; transferring oracle ownership is the only way to remove that authority. On an ORACLE-priced market the oracle reads an external feed and refuses every attested price, so a signer grant changes nothing there.
When the address is already in the requested state, the response returns unchanged: true and no calldata. For ORACLE_SIGNER, the oracle owner counts as already granted. A role the chain read cannot answer counts as a change, so the calldata comes back.

Path Parameters

string
required
Market ID.

Body Parameters

string
required
One of MARKET_ADMIN, MARKET_ISSUER, MARKET_LIQUIDATOR, ROUTER_ADMIN, ROUTER_OPERATOR or ORACLE_SIGNER.
string
required
Address to grant or revoke. Must be a 0x-prefixed 40-character hex address other than the zero address.
string
required
grant or revoke.
string
Hash of the mined transaction, as a 0x-prefixed 64-character hex string. Send it with the same role, address and action to verify the change. Omit it to receive the calldata.

Response Fields

object
The confirm call reads the receipt and checks the function, the contract, the role and the address against the request. It records nothing.

Error Codes

Confirming with txHash can also return any transaction verification error. On this endpoint every one of them answers 400, including TX_NOT_FOUND.