Skip to content

Risk engine

The SAI Guard Risk Engine is the only component that produces the user-facing verdict. It consumes structured check results and a configured policy. It MUST NOT prompt a language model for a final yes.

The engine described here is the protect-pipeline target. v0.1 instead requires Proposer.PREPARED AND Semantic.PASS AND Safety.PASS and then demo-submits. See status.

Verdicts

VerdictMeaning
PROTECTEDRequired checks passed. Simulated effects correspond to intent.
WARNINGThe transaction may be legitimate but needs explicit attention.
BLOCKEDA configured hard rule failed.

Verdicts are verification outcomes. They are not HTTP or SDK errors. See errors.

Policy

Example rules (policy is configurable; this is not a deployed table):

ConditionTypical verdict
Simulation failed (mandatory)BLOCKED
Malicious contractBLOCKED
Sanctions matchBLOCKED
Unexpected asset transferBLOCKED
Semantic verifier MISMATCHBLOCKED
Phishing originBLOCKED
Semantic verifier UNCERTAINWARNING
Unknown contractWARNING
Unlimited approvalWARNING or BLOCKED
Advisory provider failureWARNING
Mandatory provider failureBLOCKED
All mandatory checks passPROTECTED

A semantic MATCH MUST NOT clear a deterministic BLOCKED.

The Risk Engine MUST NOT return PROTECTED if required simulation failed.

Fail-closed

If a mandatory provider is down, times out, or returns malformed data:

  • do not coerce the check to pass;
  • WARNING if the check is advisory;
  • BLOCKED if the check is required for that action class.

Unknown is not safe.

Reason codes

Every non-PROTECTED result MUST carry machine-readable codes, for example:

INTENT_MISMATCH, UNEXPECTED_TRANSFER, UNLIMITED_APPROVAL, SIMULATION_FAILED, SANCTIONS_HIT, PROVIDER_UNAVAILABLE.

Internal scores, if any, MUST NOT be the primary wallet signal. See AI Transaction Protect.

Errors

Distinguish verdicts from protocol errors.

KindExamples
VerdictPROTECTED, WARNING, BLOCKED
Protocol / API errorINVALID_INTENT, INVALID_TRANSACTION, UNSUPPORTED_CHAIN, SIMULATION_UNAVAILABLE, PROVIDER_TIMEOUT

v0.1 VapError codes include NOT_FOUND, STATE, MANDATE, DECODE, SEMANTIC, SAFETY, SIGNATURE, BINDING, UNSUPPORTED_CAPABILITY. Those are API failures, not protect verdicts.