Skip to main content
The policy engine evaluates configurable rules before any transaction is broadcast to the Quantum Chain network. Policies provide compliance controls, spending protection, and operational guardrails.

How policies work

  1. You create policy rules on a vault account or tenant
  2. When a transaction is created, the policy engine evaluates all applicable rules
  3. If any rule is violated, the transaction is blocked or requires approval
  4. Only transactions that pass all policies proceed to signing

Rule types

Creating a policy

Policy evaluation flow

All rules are evaluated. If any non-approval rule fails:
  • The transaction is moved to REJECTED with an error code in the 1200 range.
  • If the failing rule is REQUIRE_APPROVAL, the transaction enters PENDING_AUTHORIZATION instead.

Approval workflow

When a REQUIRE_APPROVAL rule matches:
  1. The transaction enters PENDING_AUTHORIZATION.
  2. A webhook event approval.required is sent.
  3. An authorized user calls POST /v1/transactions/{id}/approve or POST /v1/transactions/{id}/reject.
  4. Approved transactions transition to APPROVED and then automatically to PENDING_SIGNATURE. Rejected transactions move to REJECTED.

Error codes

Best practices

Defense in depth

Combine multiple rule types. Use MAX_AMOUNT + WHITELIST_ADDRESS + DAILY_LIMIT together.

Start permissive

Begin with high limits and tighten as you understand your transaction patterns.

Monitor violations

Policy violations emit webhook events. Monitor them for suspicious activity.

Separate by vault

Apply stricter policies to hot wallets and relaxed policies to treasury vaults.