How policies work
- You create policy rules on a vault account or tenant
- When a transaction is created, the policy engine evaluates all applicable rules
- If any rule is violated, the transaction is blocked or requires approval
- Only transactions that pass all policies proceed to signing
Rule types
| Type | Description | Example |
|---|---|---|
MAX_AMOUNT | Blocks transactions above a threshold | Max 100 QC per transfer |
DAILY_LIMIT | Caps total daily outflow | Max 1,000 QC per day |
WHITELIST | Only allows transfers to approved addresses | Known exchange addresses |
BLACKLIST | Blocks transfers to specific addresses | Sanctioned addresses |
REQUIRE_APPROVAL | Requires manual approval before signing | All transfers above 50 QC |
TIME_WINDOW | Restricts transfers to specific hours | Business hours only (UTC) |
Creating a policy
Policy evaluation flow
All rules are evaluated. If any rule fails:- The transaction is blocked with an error code in the
1200range - If the failing rule is
REQUIRE_APPROVAL, the transaction entersPENDING_APPROVALinstead
Approval workflow
When aREQUIRE_APPROVAL policy triggers:
- The transaction enters
PENDING_APPROVALstatus - A webhook event
transaction.approval_requiredis sent - An authorized user calls
POST /v1/transactions/{id}/approveorPOST /v1/transactions/{id}/reject - Approved transactions proceed to
PENDING_SIGNATURE; rejected transactions move toREJECTED
Error codes
| Code | Meaning |
|---|---|
1200 | Policy violation — general |
1201 | Amount exceeds MAX_AMOUNT limit |
1202 | Destination not in whitelist |
1203 | Destination is blacklisted |
1204 | Daily limit exceeded |
1205 | Transfer outside allowed time window |
Best practices
Defense in depth
Combine multiple rule types — use MAX_AMOUNT AND WHITELIST AND 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.