Blockaid screening

How Treasury scans transactions with Blockaid, and how it records each result

Treasury scans transactions with Blockaid so your signers can see the risk of a transaction before they approve it. Treasury scans transactions on public EVM networks and Solana.

📘

Results come directly from Blockaid. The verdicts, reasons, and raw results that Treasury shows are Blockaid's own. We don't alter or add to them. Treasury only maps Blockaid's result type to a verdict name, as shown in Verdicts.

Screening is advisory. A verdict never changes a request's status or stops it. Check the verdict before your signers approve, and have them reject a request you don't trust.

Verdicts

VerdictBlockaid resultMeaning
benignBenignBlockaid found no risk.
suspiciousWarningBlockaid found something to review before approving.
maliciousMaliciousBlockaid identified the transaction as harmful.
unavailableSimulation revertedBlockaid ran the scan but couldn't grade the transaction, for example because a token transfer exceeds the sender's balance.

reasons lists Blockaid's explanation and the features it detected. raw holds Blockaid's full response, unmodified.

Treasury scans each transaction from your vault's point of view, using the vault's own address on that network.

When Treasury scans

ScanWhenRecorded?
Pre-submission scanYou scan a built transaction with POST /v2/treasury/transactions/scan, before you submit itNo
Submission scanTreasury scans each request when you submit itYes
RescanAnyone who can view a request rescans it with POST /v2/treasury/transactions/requests/{requestId}/scanYes

Pre-submission scan

Send the serialised transaction with contextType, vaultId, and, if you sign from a derived address, derivationPath. Treasury returns verdict, reasons, and raw, and stores nothing.

Submission scan

Treasury scans the request when you submit it. If Blockaid doesn't answer in time, the request is still created, and Treasury records the failed scan. Rescan the request to get a verdict.

Rescan

A rescan checks the request's current transaction, including any nonce Treasury has assigned, and records the result. Use it to refresh a verdict while signers are still deciding. The response adds scanId, firstScannedAt, and lastScannedAt to the verdict.

You can rescan a request until it reaches a final status. Requests on networks Treasury doesn't scan return an error.

Scan history

Treasury keeps a history of the scan results for each vault. It records each distinct result, not each scan:

  • The first result for a transaction creates a history entry.
  • Scanning again with the same verdict and reasons updates that entry: scanCount increases and lastScannedAt moves on.
  • A different verdict or reasons creates a new entry.
  • If a result changes and then changes back, Treasury updates the earlier entry for that result instead of adding another.
  • A scan that fails is recorded with outcome set to error.

Treasury keeps scan history after a request is deleted, so you keep a record of what your signers were shown.

See a request's latest scan

Each transaction request includes a scan block with its most recent result: scanId, outcome, verdict, reasons, scanCount, firstScannedAt, and lastScannedAt. scan is null if the request has never been scanned.

List a vault's scan history

GET /v2/treasury/vaults/{vaultId}/transaction-scans lists the vault's history entries, most recent first. Each entry has:

FieldDescription
idThe entry's ID. A rescan returns it as scanId.
ecosystem, chainThe network the transaction is on.
accountAddressThe vault address the transaction was scanned from.
requestIdThe transaction request that was scanned.
payloadHashA hash of the scanned transaction. A rebuilt transaction has a new hash.
outcomesuccess, or error if Blockaid didn't return a result.
verdictThe verdict, or null when outcome is error.
reasonsBlockaid's reasons for the verdict.
errorStatusThe error status when outcome is error.
scanCountHow many scans have returned this result.
firstScannedAt, lastScannedAtWhen this result was first and most recently returned.

Filter by verdict, outcome, or requestId. Use first (1 to 200) to set the page size, and after to get the next page.

When Blockaid can't answer

Treasury never reports a failed scan as benign:

  • A pre-submission scan or rescan returns a 502 error if Blockaid fails or returns no verdict. A rescan records the failure before returning the error.
  • A submission scan records the failure and the request continues.

Did this page help you?