Skip to main content
POST
Grants or revokes LIQUIDATOR_ROLE for an address on the market contract. The contract refuses Liquidate Loan from any caller without the role. Settle Expired Auction is open to any caller once the auction has expired, and needs the role only while the market is paused.
Revoking the role from every holder leaves the market with no liquidator. Loans still become liquidatable, but no liquidation can start until an address holds the role again.
The wallet holding DEFAULT_ADMIN_ROLE on the market signs the change. The endpoint returns the unsigned grantRole or revokeRole call for that wallet, and the same POST with txHash verifies the mined transaction against the change you asked for. The confirm call records nothing; it checks the receipt and echoes the hash. A lender of record can also name a liquidator in its adoption terms on Accept Lender Role, and that address receives the role in the adoption transaction. The same change is available as MARKET_LIQUIDATOR on Set Access Role.
When the address is already in the requested state, the response returns unchanged: true and no calldata. Nothing needs to be signed. 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
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 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.