Nubank: Scaling Fraud Detection to 450M Events Daily

Jairo (Nubank, Defense IO team), Daniel (Nubank, Defense IO team)28 May 2026

Problem

Nubank serves 131 million customers, and many teams (card issuing, lending, e-commerce, fraud units) need fraud protection in their flows. Each unit first embedded its own fraud logic in its product service. Policies were duplicated, sometimes inconsistent, and a new policy took 3 to 5 weeks to release because it needed engineers. A bad rule can block millions of customers, so changes must be fast and safe at once.

Example from the article: analytical models had to be translated into Clojure by hand and shipped through a full deployment cycle.

Solution in brief

Nubank moved fraud logic into one Defense Platform. Policies are database entities in a declarative DSL, so analysts change them through a UI without deployments. New policies first run in an asynchronous shadow flow on production traffic. An agent plugin (prompts plus an MCP server) lets analysts edit the same objects from any AI client.

Questions this case answers
  • How to let non-engineers change real-time decision rules quickly while keeping safe rollout and an audit trail
  • How to validate a new decision policy against production traffic before it can affect users
  • How to let fraud analysts change decision rules in days instead of weeks without an engineering release?
  • How to test new fraud policies and models on live traffic without affecting customers?

Tools and methods

  • Shadow mode — a parallel asynchronous flow that receives the same events as production, so policies and models are evaluated on live traffic with no customer impact.
  • Declarative policy DSL and registry — policies stored as database entities, changed without code releases.
  • Feature registry and configuration manager — one feature catalog, and thresholds changed in real time.
  • Agent plugin (skills plus MCP server) — AI clients edit policies through the same tools as the UI.
  • Apache Kafka, Amazon DynamoDB — messaging and storage behind the platform.
Continue reading — it's free

Google or a one-time email code. No password.