Policies
The Policy Engine enables you to define rules that control transaction behavior, enforce compliance, and manage risk.Policy Types
Address Whitelist
Restrict transactions to approved addresses only.| Field | Description |
|---|---|
enabled | Activate this rule |
allowedAddresses | List of permitted addresses |
denyAll | Block all non-whitelisted addresses |
Amount Limits
Set daily and per-transaction spending limits.| Field | Description |
|---|---|
dailyLimit | Maximum daily spend (USD) |
perTxLimit | Maximum per transaction (USD) |
currency | Limit currency (USD, EUR, etc.) |
Approval Flow
Require human approval for high-value transactions.| Field | Description |
|---|---|
threshold | Amount triggering approval (USD) |
approvers | List of approver user IDs |
requiredApprovals | Number of approvals needed |
Policy Priority
Policies are evaluated in priority order (highest first). The first matching policy determines the outcome.Policy Evaluation
Creating Policies
Checking Transactions
Before signing, check if a transaction is allowed:Approval Workflow
When approval is required:- Transaction is held in
PENDING_APPROVALstate - Approvers are notified (webhook/email)
- Approver reviews and approves/rejects
- Transaction proceeds or is cancelled
Best Practices
Start Restrictive
Start Restrictive
Begin with strict policies and relax as needed:
- Enable address whitelist
- Set conservative limits
- Require approval for large amounts
Layer Policies
Layer Policies
Use multiple policies with different priorities:
- High priority: Block known bad actors
- Medium priority: Enforce limits
- Low priority: Default allow
Monitor & Adjust
Monitor & Adjust
- Review policy hits regularly
- Adjust thresholds based on usage
- Add addresses to whitelist as needed