InterviewLegend

Design Real-Time Fraud Detection

Frequently asked
Alex Chen45 min readUpdated

Cash App scores every transaction in real time and keeps a running risk rating on each customer: an activation rating set at signup, and a continuous one that moves as the customer behaves. Start the design from that rating. The generic answer is e-commerce card fraud: a stolen card at a checkout, score the purchase, approve or decline. That is not where Block bleeds. Block moves money between people and between sellers and buyers, and the expensive fraud lives in the money-movement path and in the account itself, not at a shopping cart.

Say the threat model out loud in the first minute, because picking it correctly is most of the signal in this round. One fact shapes everything: a lot of Block's money movement is fast and hard to reverse. A Cash App balance sends to another balance instantly, a cash-out pushes to an external debit card over card-network rails, and a Bitcoin withdrawal leaves for good. Once money has cashed out to a mule's debit card or left as Bitcoin, you are not clawing it back the way a card issuer reverses a chargeback. That speed is the product itself, and it is also the attack surface.

So the system watches a stream of transfer, cash-out, login, and account-change events and decides, fast, whether to let a money-moving action through. It is not scoring purchases at a cart. And it has to work across business units that get abused differently. Cash App P2P, Square seller payments, and Afterpay installments each leak money in their own shape, and the feature work below has to cover all three.

Name the four abuse shapes you are defending against, because they drive the features later. P2P scams are the signature one: a real customer is socially engineered into authorizing a send to a scammer, so the account is not compromised, the person is. Account takeover, ATO, is someone logging into a real customer's Cash App, relinking a card, and draining the balance to a new debit card or to Bitcoin.

What's inside
  • 1 diagram
  • 5 sections
  • about 45 min

Premium lessonBlock interview guide

These took digging.

What candidates walked out with, from 20,000+ reports, forum threads behind logins and write-ups in Chinese. Then solved step by step.

100 companies. Checked every month.

Unlock all 100 companies

$49 a year · less than $1 a week · 30-day money-back guarantee

Had your Block interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Block interview guide

Know what Block asks before you walk in.

13 coding · 5 system design · 14 behavioral questions

Get Premium$49 a year · 30-day money-back guarantee
Or start freeNo card.

Get their questions first.

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.