Skip to main content
This recipe changes one setting of your stablecoin delegate on Ethereum: you read its current configuration, prepare the transaction that makes the change, then sign and send it from your capital provider admin wallet. The example sets the discount on USTB to 0.1%. Every other change, such as whitelisting an RWA, setting a custody address, or pausing the delegate, follows the same steps with another action from Admin actions. Multiliquid never signs or sends the transaction. Your capital provider admin wallet signs it and sends it to Ethereum, and the change takes effect when it is included in a block.

Before you start

  • Your organization ID and delegate ID. GET /v1/organization returns the organization’s id, and GET /v1/organizations/{organizationId}/delegates lists your delegates with their delegateId, as Delegates shows. The examples set them as $ORGANIZATION_ID and $DELEGATE_ID.
  • An API key with read to read the configuration and cp:admin to prepare a change. Only an admin of your organization can grant cp:admin. Authentication explains scopes.
  • The capital provider admin wallet. On-chain, the delegate keeps its admins under the identifier issuerAdmins, so the API names this wallet issuerAdminAddress. Only an admin wallet can make a change. The examples use 0x1111111111111111111111111111111111111111.
  • ETH for gas in that wallet.

1. Read the current configuration

GET /v1/organizations/{organizationId}/delegates/{delegateId}/admin/state returns the delegate’s configuration as it is on-chain now. Add rwa, stablecoin, account, or issuerAdminAddress to check one address against the delegate’s RWA whitelist, stablecoin whitelist, blacklist, or admins. Here you confirm that USTB is whitelisted and that your wallet is an admin.
Response
rwaWhitelisted and isIssuerAdmin appear because the request asked for them. Admin state describes every field.

2. Prepare the change

POST /v1/organizations/{organizationId}/delegates/{delegateId}/admin/prepare takes the network, the admin wallet that will send the transaction, and the action. A discount is set by the RWA’s ID, which deployment info lists, and a rate is a whole number of basis points in rateBps: 10 is 0.1%.
Response
Preparing stores nothing and changes nothing. You can prepare as often as you like, and discard a transaction you don’t send.

3. Check the result

checks tells you whether the transaction would succeed if sent now:
  • isIssuerAdmin is whether issuerAdminAddress is an admin of the delegate.
  • simulation.passed is whether the transaction succeeds when run against the current chain state. When it fails, simulation.error says why, and the transaction’s gas and serialized are null.
A failing check never fails the request: you still receive the transaction, so you can see what to fix. Here, a wallet that is not an admin of the delegate prepared the same change:
Response
Don’t send a transaction whose checks fail: it reverts on-chain and still costs gas. Fix the cause, such as preparing from an admin wallet or unpausing the delegate first, and prepare again.

4. Sign and send the transaction

Sign transaction with the wallet in transaction.from, your capital provider admin wallet, and send it to Ethereum mainnet. It is the only transaction the change needs. It is complete: the API filled in the wallet’s next nonce, the gas limit, and current fees, so sign serialized as returned, or the fields unchanged, and don’t set the nonce or fees yourself. Sign it within a few blocks; if the wallet sends another transaction first, or the fees have risen, prepare again.

5. Confirm the change

Once the transaction is in a block, check its receipt: status 1 means the change is live, and 0 means it reverted and nothing changed, so prepare again and check checks before you resend. Read the configuration again, as in step 1, to confirm a whitelist, custody, cold storage, pause, blacklist, or admin change. A rate, such as this discount, is not part of the admin state; the transaction’s inclusion is the confirmation.

When something goes wrong

Errors lists every code.