What you will learn
- How the PolicyEngine evaluates TxIntents against configurable rules
- Available policy fields and their effects
- How to configure policies for different risk profiles
- How risk scoring interacts with policy decisions
Overview
The PolicyEngine is the gatekeeper of Domain B. Every TxIntent must pass policy evaluation before it can be built, simulated, or signed. The engine evaluates a fixed set of rules in order and produces one of three decisions:Evaluation order
Rules are evaluated in this order. The firstdeny stops evaluation:
PolicyConfig Fields
Allowlist behavior
Empty allowlists ([]) are permissive — they allow all values:
contractAllowlist, tokenAllowlist, and recipientAllowlist.
Value extraction per action type
The policy engine extracts different fields depending on the action type:Example policies
- Restrictive
- Permissive (Development)
Small value limit, specific tokens only, Base chain only, low rate limit:
Risk scoring
The PreflightService computes a 7-factor risk score (0-100):
When the computed risk score exceeds
maxRiskScore, the policy decision escalates to require_approval.
Next steps
- Approval Model — How approval works after policy evaluation
- Configuration Reference — All PolicyConfig fields with examples
- Error Codes — Policy denial error shapes