Design Account Takeover Detection for Crypto Withdrawals

Last updated: November 29, 2026

Quick Overview

Design an ML system that scores every withdrawal request and login on a crypto exchange for account takeover risk in under 100 ms, choosing between allow, step-up verification, hold for review and block, when confirmed labels arrive days later and fraud is rare.

Gemini
ML System Design
Machine Learning Engineer
Gemini
November 29, 2026
Machine Learning Engineer
System Design Round
ML System Design
Hard

0

0

0 solved


Design an ML system that scores every withdrawal request and login on a crypto exchange for account takeover risk in under 100 ms, choosing between allow, step-up verification, hold for review and block, when confirmed labels arrive days later and fraud is rare.

Crypto withdrawals at Gemini are irreversible, so stopping a takeover before funds leave matters more than almost anything else, while false holds annoy legitimate traders. The interviewer probes features from sessions and devices, label delay, extreme class imbalance, cost-sensitive thresholds and adversarial drift.

What the Interviewer Expects
  • Frame the decision with explicit costs of a missed takeover versus friction
  • Build features from device, network, session, account change and destination address history
  • Handle delayed and noisy labels (customer reports, chargebacks, manual reviews)
  • Serve with a low-latency feature store and a fallback when it fails
  • Combine rules and the model, with action thresholds tuned per segment
  • Monitor drift and run shadow models before rollout
Key Topics to Cover
Fraud Detection
Feature Store
Class Imbalance
Label Delay
Cost-Sensitive Decisions
Model Monitoring
How to Approach This
  1. Start by mapping the business objective to a concrete ML objective and metric.
  2. Cover the full pipeline: data collection, feature engineering, model selection, training, serving.
  3. Discuss online vs offline evaluation. Plan an A/B test to validate real-world impact.
  4. Address the serving latency budget and whether batch or real-time inference is needed.
  5. Think about the data flywheel: how user feedback improves the model over time.
Possible Follow-up Questions
  • How would you train when your own holds stop the attacks you would label (selection bias)?
  • Which features would an attacker find easiest to spoof, and how do you reduce reliance on them?
  • How do you decide the step-up threshold versus the hold threshold?
  • How would you explain a hold to a customer and to a regulator?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice ML System Design Problems
Sample Answer
Requirements

Score at login and at withdrawal; p99 under 100 ms; actions allow, step-up (2FA re-prompt, email confirm), hold for review, block. Takeovers are perhaps 1 in 10,000 withdrawals but losses are irrevers...

High-Level Design

Events (logins, password and 2FA changes, API key creation, address book edits, withdrawals) flow into a stream processor that updates real-time features in an online store and logs point-in-time snap...


Submit Your Answer
Markdown supported

Related Questions