Signing

How Treasury and io.sign work together to take a transaction request from submission to the network

Treasury never holds your private key. When you submit a transaction request, Treasury asks io.sign for a signature, your vault's signers approve and sign with io.sign Multi-Party Computation (MPC), and Treasury broadcasts the signed transaction. This page shows how the two work together.

Signing workflow

%%{init: {"theme": "base", "themeVariables": {"primaryColor": "#E8EEFB", "primaryTextColor": "#07112B", "primaryBorderColor": "#003EB7", "lineColor": "#8A96B4", "actorBkg": "#07112B", "actorTextColor": "#FFFFFF", "actorBorder": "#07112B", "actorLineColor": "#8A96B4", "signalColor": "#003EB7", "signalTextColor": "#07112B", "noteBkgColor": "#E3F4EF", "noteBorderColor": "#0E7C66", "noteTextColor": "#07112B", "activationBkgColor": "#E8EEFB", "sequenceNumberColor": "#FFFFFF", "fontSize": "14px"}}}%%
sequenceDiagram
    autonumber
    participant App as Your application
    participant T as Treasury
    participant B as Blockaid
    participant S as io.sign
    participant Sig as Signers
    participant N as Network

    App->>T: Submit transaction request
    T->>B: Scan transaction
    B-->>T: Verdict
    T->>S: Create signature request
    Note over T: submitted_for_signature
    S->>Sig: Notify signers
    Sig-->>S: Approve until the threshold is met
    Note over S,Sig: Presigning
    S->>T: Ready for final data
    T-->>S: Final transaction with nonce, sequence, or blockhash
    Note over S,Sig: MPC signing
    S->>T: Signature completed
    T->>N: Broadcast signed transaction
    Note over T: broadcast
    N-->>T: Confirmed, then finalised
  1. Submit. Your application submits a built transaction. Treasury records the request as pending.
  2. Screen. On public EVM networks and Solana, Treasury scans the transaction with Blockaid. The verdict is advisory. See Blockaid screening.
  3. Request a signature. Treasury creates a signature request in io.sign for the vault, and the request moves to submitted_for_signature.
  4. Approve. io.sign notifies the vault's signers. People approve on their Mobile Signer, and Virtual Signers apply your approval policy. Approvals continue until the signers' combined weight meets the vault's threshold.
  5. Presign. The approving signers run the first rounds of the MPC protocol.
  6. Set the final data. Before signing, io.sign asks Treasury for the final transaction. On EVM networks, including io.network, and on XRP, Treasury assigns the nonce or sequence number now, so transactions from one address go out in order. On XRP it also refreshes the last ledger the transaction is valid for. On Solana, Treasury refreshes the recent blockhash so the transaction doesn't expire during signing. Only these values change: the recipient, amount, and fees your signers approved stay the same.
  7. Sign. The signers complete the MPC protocol. No signer holds or reveals the complete private key.
  8. Broadcast. io.sign tells Treasury that the signature is ready. Treasury attaches it to the transaction and broadcasts it, or holds it as described in After signing.
  9. Confirm. Treasury tracks the transaction on chain until it is final. See On-chain status.

io.sign and Treasury statuses

A transaction request starts in Treasury, passes to io.sign for approval and signing, and comes back to Treasury to be broadcast and tracked on chain. Each stage has its own statuses:

%%{init: {"theme": "base", "themeVariables": {"primaryColor": "#E8EEFB", "primaryTextColor": "#07112B", "primaryBorderColor": "#003EB7", "lineColor": "#8A96B4", "edgeLabelBackground": "#F4F6FA", "clusterBkg": "#F4F6FA", "clusterBorder": "#8A96B4", "fontSize": "14px"}, "flowchart": {"curve": "basis", "nodeSpacing": 30, "rankSpacing": 40}}}%%
flowchart TD
    submit(["Submit"]) --> t_pending

    subgraph treasury1["Treasury: transaction request"]
        t_pending["pending"] --> t_sfs["submitted_for_signature"]
    end

    t_sfs -->|"Signature request"| s_voting

    subgraph iosign["io.sign: signature request"]
        s_voting["voting"] -->|"Threshold met"| s_presigning["presigning"]
        s_presigning --> s_signing["signing"]
        s_signing --> s_completed["completed"]
        s_voting -. "Declined, deadline passed, or cancelled" .-> s_stopped["rejected / expired / cancelled / failed"]
        s_signing -. "Error" .-> s_stopped
    end

    s_completed --> t_broadcast
    s_completed --> t_signed
    s_completed --> t_wtb
    s_completed -->|"Signature-only"| t_fulfilled
    s_stopped -->|"Same status"| t_stopped

    subgraph treasury2["Treasury: after signing"]
        t_signed["signed"] -->|"Its turn comes"| t_broadcast["broadcast"]
        t_wtb["waiting_to_broadcast"] -->|"You call broadcast"| t_broadcast
        t_fulfilled["fulfilled"]
        t_stopped["rejected / expired / cancelled / failed"]
    end

    t_broadcast --> c_pending

    subgraph chain["On chain: onChainTransaction.status"]
        c_pending["pending"] --> c_confirmed["confirmed"]
        c_confirmed --> c_finalized["finalized"]
        c_pending -->|"XRP, io.network"| c_finalized
        c_pending -. "Reverted" .-> c_failed["failed"]
        c_confirmed -. "Block dropped" .-> c_orphaned["orphaned"]
        c_orphaned -. "Included again" .-> c_confirmed
    end

    classDef active fill:#E8EEFB,stroke:#003EB7,color:#07112B
    classDef success fill:#E3F4EF,stroke:#0E7C66,color:#07112B,font-weight:bold
    classDef stopped fill:#FDECEC,stroke:#E03737,color:#07112B
    classDef start fill:#07112B,stroke:#07112B,color:#FFFFFF
    class t_pending,t_sfs,s_voting,s_presigning,s_signing,t_signed,t_wtb,c_pending,c_confirmed,c_orphaned active
    class s_completed,t_broadcast,t_fulfilled,c_finalized success
    class s_stopped,t_stopped,c_failed stopped
    class submit start

Blue statuses are in progress, green statuses are successful, and red statuses are final without a successful transaction. A request whose transaction fails on chain becomes failed.

While io.sign works on the signature, the transaction request stays submitted_for_signature. When io.sign finishes, Treasury updates the request:

io.sign statusTransaction request status
voting, presigning, signingsubmitted_for_signature
completedbroadcast, signed, waiting_to_broadcast, or fulfilled. See After signing.
rejectedrejected
expiredexpired
cancelledcancelled
failedfailed, with io.sign's error in failureReason

After signing

RequestWhat Treasury doesStatus
Most transfersBroadcasts straight away, retrying if the node is briefly unavailablebroadcast
EVM, XRP, or Liquid transfers waiting for an earlier transaction or a co-signatureHolds the transaction until its turnsigned
Created with broadcast set to falseHolds the transaction until you call the broadcast endpointwaiting_to_broadcast
Signature-only requestStores the signature. Nothing is broadcast.fulfilled

If the network rejects the transaction, the request becomes failed and failureReason gives the node's message. For every status, see Transaction requests.

Sign for other chains

To sign for a chain Treasury doesn't support, use io.sign directly. See Signatures for unsupported chains.


Did this page help you?