Overview
Yggdrasil supports two execution modes for rules:- SINGLE-TX: Evaluate conditions on each individual record
- WINDOWED: Aggregate records by account and evaluate within time windows
type field.
Rule Routing
SINGLE-TX Rules
When to Use
- Threshold checks: Amount > $10,000
- Field existence: Missing required fields
- Pattern matching: Email format validation
- Cross-field validation: Balance mismatches
- Compliance flags: GDPR consent checks
Example: CTR Threshold
Execution Path
WINDOWED Rules
When to Use
- Aggregations: Sum of transactions to same recipient
- Velocity limits: Transaction frequency checks
- Structuring detection: Multiple sub-threshold transactions
- Dormant reactivation: Account inactivity patterns
- Round amount patterns: Repeated round-dollar amounts
Common Parameters
time_window: Window size in hours (e.g., 24 for daily)threshold: Aggregate threshold or count limitgroup_by_field: Field to group by (default:recipient)aggregation_field: Field to aggregate (default:amount)aggregation_function:sum,count,avg,max,min
Example: CTR Aggregation
Example: Structuring Detection
WINDOWED Rule Subtypes
1. Aggregation
Types:aggregation, ctr_aggregation
Groups records by a field (e.g., recipient) and aggregates values within a time window.
2. Velocity
Types:velocity, velocity_limit, sar_velocity, sub_threshold_velocity, structuring
Counts transaction frequency or aggregates volume within a window.
3. Dormant Reactivation
Type:dormant_reactivation
Detects accounts with 90+ day inactivity followed by large transactions.
4. Round Amount Pattern
Type:round_amount
Detects 3+ round-dollar transactions (divisible by 1,000) within 30 days.
Execution Flow Comparison
| Aspect | SINGLE-TX | WINDOWED |
|---|---|---|
| Grouping | No grouping | Group by account |
| Time | Evaluated per record | Evaluated per window |
| Violations | One per matching record | One per matching window |
| Evidence | Single record | Multiple records |
| Use Cases | Thresholds, patterns | Aggregations, velocity |
Choosing the Right Type
Use SINGLE-TX when:
- ✅ You need to check individual record values
- ✅ The rule is about field existence or format
- ✅ No aggregation is needed
- ✅ Time windows are irrelevant
Use WINDOWED when:
- ✅ You need to aggregate multiple transactions
- ✅ The rule is about frequency or velocity
- ✅ You need to detect patterns across time
- ✅ The violation requires context from multiple records
Next Steps
Operators
Learn about supported operators
Architecture
Understand the execution flow