Risk and Access
Set Access Role
Grant or revoke a role on the market, its liquidation router or its price oracle
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
The confirm call reads the receipt and checks the function, the contract, the role and the address against the request. It records nothing.
txHash verifies the mined transaction.
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
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.