pub fn monitor_transaction(
tx: &Transaction,
profile: &CustomerRiskProfile,
config: &MonitoringConfig,
alert_id_start: u64,
) -> Vec<MonitoringAlert>Expand description
Monitor a single transaction and generate any applicable alerts.
This is a direct port of the C# TransactionMonitoringKernel.MonitorTransaction logic:
- Check velocity breach (too many transactions in time window)
- Check amount threshold (single large transaction)
- Check structured transactions (smurfing - amounts just under threshold)
- Check geographic anomaly (unusual destination country)