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
| Verdict | Blockaid result | Meaning |
|---|---|---|
benign | Benign | Blockaid found no risk. |
suspicious | Warning | Blockaid found something to review before approving. |
malicious | Malicious | Blockaid identified the transaction as harmful. |
unavailable | Simulation reverted | Blockaid 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
| Scan | When | Recorded? |
|---|---|---|
| Pre-submission scan | You scan a built transaction with POST /v2/treasury/transactions/scan, before you submit it | No |
| Submission scan | Treasury scans each request when you submit it | Yes |
| Rescan | Anyone who can view a request rescans it with POST /v2/treasury/transactions/requests/{requestId}/scan | Yes |
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:
scanCountincreases andlastScannedAtmoves 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
outcomeset toerror.
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:
| Field | Description |
|---|---|
id | The entry's ID. A rescan returns it as scanId. |
ecosystem, chain | The network the transaction is on. |
accountAddress | The vault address the transaction was scanned from. |
requestId | The transaction request that was scanned. |
payloadHash | A hash of the scanned transaction. A rebuilt transaction has a new hash. |
outcome | success, or error if Blockaid didn't return a result. |
verdict | The verdict, or null when outcome is error. |
reasons | Blockaid's reasons for the verdict. |
errorStatus | The error status when outcome is error. |
scanCount | How many scans have returned this result. |
firstScannedAt, lastScannedAt | When 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
502error 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.
Updated 17 days ago