Financial analytics dashboard showing real-time transaction monitoring
Back

Financial Technology · AI & Automation

Building a Real-Time Fraud Detection and Investigation Platform

An end-to-end AI-powered platform that reduced fraud losses by 38% while cutting analyst review time from 6 minutes to 90 seconds—without slowing down a single legitimate transaction.

Reduction in fraud losses

38%

Timeline

5 months

Industry

fintech

Type

Full-stack platform build

✦ About Our Partner

Our partner in this project is Digital Banking Platform, a fintech company building at scale.

Company Overview

Consumer fintech, venture-backed, 400K+ active accounts

Project Timeline

5 months

Engagement Type

Full-stack platform build

Discover the challenge and how we solved it

Continue →

01

The Challenge of Scale

A rapidly scaling fintech platform faced an existential problem: their fraud controls couldn't keep up with growth.

Digital Banking Platform had grown to serve 400K+ consumer accounts with 2M+ monthly transactions. Their static fraud-prevention system—built when they were processing a fraction of current volume—was failing on two fronts: analysts spent 6+ minutes per flagged case with no visibility into why transactions were blocked, and the rule engine's reaction time meant legitimate customers were getting declined at checkout.

The operational toll was real. A lean engineering team spent days fighting fraud spikes. Every threshold adjustment created new problems. By the time Loam was engaged, incremental fixes were no longer enough.

Key Metrics

400K+

Active Accounts

2M+

Monthly Transactions

$180K

Monthly Fraud Loss

6 min

Avg Review Time

02 — Challenge & Goals

Static rules are inherently reactive. By the time you adjust a rule, fraudsters have already moved on. At scale, reactivity is a liability.

Understanding both the business and technical landscape

Business & Operations

The existing system evaluated transactions in isolation using hard-coded rules. Fraudsters operate across multiple accounts and sessions. The rules engine had zero visibility into these patterns. Each rule update required a full engineering cycle, meaning the team was always reacting to fraud that had already happened.

Technical Constraints

Fraud analysis happened on the critical checkout path. A slow fraud check meant slow checkout. At 2M+ monthly transactions, even a 100ms delay translated to abandoned carts and lost revenue.

Success Goals

1

Sub-200ms Decisions

Score every transaction in under 200ms without impacting checkout

2

Explainable AI

Show analysts exactly which signals drove each fraud decision

3

Configurable Control

Update thresholds in minutes, not weeks

4

Compliance-First

Maintain PCI-DSS integrity across all data flows

04 — Discovery & Strategy

Engineering Discovery

Before writing code, we spent two weeks analyzing 18 months of transaction data, shadowing analysts, and mapping system constraints. What we found shaped the entire platform.

1

Workflow Audit

Finding

Analysts were getting only a rule ID and amount. They had no visibility into which signals had fired, forcing 20+ minute manual investigations per case.

Decision

We chose gradient-boosted models over deep learning specifically for explainability. A deep-learning model would be more accurate, but unexplainable.

Outcome

With feature-attribution explanations, average case resolution time dropped from 6 minutes to 90 seconds.

2

Stakeholder Interviews

Finding

Real fraud clustered at the device and session level. A single attacker using the same device would attempt multiple transactions within minutes. Existing rules evaluating transactions in isolation missed this entirely.

Decision

Build a feature store that pre-computes device fingerprints, session behavior, and clustering. Make these signals available via fast lookup instead of expensive runtime computation.

Outcome

Pre-computed features became the single biggest leverage point for hitting the 200ms latency target.

3

Data and Risk Mapping

Finding

Checkout was synchronous. Any delay in fraud analysis translated directly to checkout latency. At traffic peaks, a single-threaded analysis would bottleneck.

Decision

Design the scoring system asynchronously. Fraud check runs in parallel with the transaction; decisions are used for post-transaction enforcement and alerts, not real-time blocking.

Outcome

Checkout latency was decoupled from fraud-scoring latency. Checkout stays fast regardless of model performance.

4

Product and Architecture Workshop

Finding

Identity signals (KYC provider data) and behavioral signals (device, session, transaction) lived in separate systems. Neither had a unified view of customer risk.

Decision

Build a feature store that unifies signals from identity, KYC, and behavioral systems. Carefully scope to ensure cardholder data never mixes with identity provider data inappropriately.

Outcome

The model gained visibility into the full customer risk picture without violating PCI compliance boundaries.

5

Validated Delivery Roadmap

Finding

The team needed a clear path from research to production with multiple validation gates to prevent shipping a model that looked good in testing but failed in real traffic.

Decision

Phase the rollout: shadow mode validation → gradual traffic ramp → real-time monitoring. Build automated drift detection to catch model degradation.

Outcome

Three weeks in shadow mode caught model drift before production. Gradual rollout identified edge cases in real traffic.

05 - System Architecture

System Architecture

A layered system where each layer serves a specific purpose. Responsibilities are separated so each can be optimized independently.

1

Experience Layer

Analyst review console and customer-facing adaptive authentication. Decoupled from core transaction systems so fraud-team deploys never risk checkout.

React 19TypeScriptTailwind CSSWebSocket
2

API & Orchestration

Dedicated fraud-scoring API called asynchronously. Handles model inference, feature lookup, and decision logging without touching the checkout path.

Node.jsExpressEvent-drivengRPC
3

Rules & Intelligence

Pre-computed feature store with device fingerprints, session patterns, and behavioral clustering. Real-time path does fast lookups instead of computing features at request time.

RedisPostgreSQLStream ProcessingKafka
4

Data & Integrations

Receives signals from identity verification, KYC, and transaction systems. Normalizes and pipes into the feature store with careful PCI scoping.

KafkaData PipelinesPostgreSQLS3
5

Security & Observability

Auto-scaling infrastructure with real-time monitoring of model accuracy, latency, and compliance metrics. Automated drift detection and alerting.

KubernetesAWSPrometheusGrafanaXGBoostSHAP

System Design Philosophy

Each layer serves a specific purpose and can be scaled or updated independently. The separation of concerns ensures that fraud scoring (layers 2-4) can be as complex and slow as needed without affecting the checkout experience. Checkout always stays fast because it's completely decoupled from the analysis pipeline.

06 — What We Built

Platform Architecture

The platform comprises four major systems that work together to detect fraud at scale while keeping checkout fast and analyst review time low.

Each system is designed to operate independently while contributing to a unified fraud detection and prevention strategy.

Real-Time Decision Engine

System 1

🔍

Unified Investigation Workspace

System 2

📊

Rules & Workflow Control

System 3

🛡️

Analytics, Audit & Reporting

System 4

1

Real-Time Decision Engine

Every transaction gets a risk score in under 200ms without touching checkout. Scores are explainable and actionable for analysts.

  • Sub-200ms latency via pre-computed features
  • No impact to checkout experience
  • Full feature-attribution visibility
  • Version-controlled model deployment
Real-time scoring system showing feature attribution
2

Unified Investigation Workspace

Analysts see the complete picture. Every flagged transaction shows the exact features that drove the fraud score, plus customer history and risk context.

  • Feature-attribution explanations (SHAP values)
  • One-click threshold adjustments
  • Real-time case queue
  • Color-coded risk indicators
Fraud investigation dashboard interface
3

Rules & Workflow Control

Post-scoring, configurable rules route cases intelligently. High-risk cases go to analysts. Medium-risk cases trigger adaptive authentication. Low-risk cases proceed instantly.

  • Threshold changes without deployments
  • A/B test models safely in shadow mode
  • Automated triage workflow
  • One-click rollbacks
Rules engine configuration interface
4

Analytics, Audit & Reporting

Complete observability into model performance, fraud patterns, and compliance. Automated drift detection alerts the team to model degradation before it impacts production.

  • Daily accuracy and drift reports
  • Real-time compliance audits
  • Complete decision audit trails
  • On-call dashboards with full context
Analytics dashboard showing model performance metrics

07 — Delivery & Engineering

How We Delivered

1

Discover

Two weeks of data analysis, workflow auditing, and technical assessment

Output: Architecture roadmap and feature requirements

2

Define

System design, model selection, and API specification

Output: Architecture diagrams and design documents

3

Design

Feature store and model pipeline development

Output: Feature engineering pipeline with 200+ signals

4

Build

Parallel development of API, console, and infrastructure

Output: Production-ready platform with < 50ms inference

5

Validate and Launch

Shadow mode testing, gradual rollout, and team certification

Output: Production deployment with full monitoring and runbooks

Strategic Decisions

Key Engineering Decisions

1

Challenge

Achieving sub-200ms latency at 40K+ transactions per day when naive model inference would take 650ms

Decision

Pre-compute expensive features asynchronously into a feature store. Move real-time path to Redis lookup + lightweight scoring.

Outcome

p99 latency dropped from 650ms to 180ms. Checkout unaffected. Feature store in Redis enables < 5ms lookups.

2

Challenge

Making machine-learning decisions explainable without requiring analysts to understand ML mathematics

Decision

Choose XGBoost with SHAP feature-attribution over a more accurate deep-learning model. Prioritize explainability.

Outcome

Analysts see top contributing features for each decision. Average case resolution dropped from 6 minutes to 90 seconds.

3

Challenge

Preventing regulatory and compliance violations while unifying signals from multiple PCI-scoped systems

Decision

Build separate PCI-scoped pipelines. Tokenize cardholder data before it leaves transaction systems. Join only anonymized features.

Outcome

Model has unified risk visibility while maintaining PCI-DSS compliance. Complete audit trails.

08 - Impact & Testimonial

The Results

Primary Business Impact

38%

Reduction in fraud losses

Business Metrics

$684K

Annual fraud prevention value

60%

Reduction in false declines

4.0x

Return on platform investment

Engineering Metrics

180ms

p50 decision latency

99.95%

Platform availability

200+

Behavioral features engineered

Before & After

Analyst Review Time

Before

6 minutes per case

After

90 seconds per case

False Positive Rate

Before

15% decline rate

After

2% decline rate

Rule Update Cycle

Before

2 weeks per release

After

30 minutes via shadow mode

Before Loam, we were trapped in a cycle where tightening fraud rules meant rejecting legitimate customers, and loosening them meant letting fraud through. This platform gave us a completely different approach. Now we're catching fraud while letting legitimate customers transact frictionlessly.

Sarah Chen

VP of Fraud & Risk

Digital Banking Platform