System Objective
1. System Objective
Design a real-time, scalable fraud prevention platform that detects suspicious blockchain transaction behavior before settlement by combining:
Event streaming and real-time feature engineering (Confluent)
Machine-learning–based risk scoring (Google Cloud Vertex AI)
Policy-driven alerting and intervention (off-chain)
2. Architectural Principles
Event-driven (no batch dependencies)
Low latency (sub-second detection)
Stateless services
Cloud-native & managed
Explainable AI decisions
Blockchain-aware but chain-agnostic
3. High-Level Architecture Overview
┌────────────────────┐
│ Blockchain Network │
│ (Node / Indexer) │
└─────────┬──────────┘
│ Transactions
▼
┌──────────────────────────┐
│ Confluent Cloud (Kafka) │
│ - raw-transactions │
│ - enriched-transactions │
│ - fraud-alerts │
└─────────┬────────────────┘
│ Feature Events
▼
┌──────────────────────────┐
│ Stream Processing Layer │
│ (ksqlDB / Kafka Streams) │
│ - Windowed features │
│ - Behavioral metrics │
└─────────┬────────────────┘
│ Feature Vector
▼
┌──────────────────────────┐
│ Google Cloud Run │
│ Fraud Scoring API │
└─────────┬────────────────┘
│ Inference Call
▼
┌──────────────────────────┐
│ Vertex AI │
│ Fraud Detection Model │
└─────────┬────────────────┘
│ Risk Score
▼
┌──────────────────────────┐
│ Decision & Policy Layer │
│ (Cloud Run) │
└─────────┬────────────────┘
│ Alerts / Logs
▼
┌──────────────┬───────────────┐
│ Fraud Alerts │ BigQuery │
│ Dashboard │ Audit / Train │
└──────────────┴───────────────┘Last updated

