Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.
Security

Real-Time Transaction Fraud Rules Engine with Case Review for Fintech Startups

A real-time fraud scoring service for fintech startups and wallets that evaluates each payment against analyst-written rules and a machine learning risk score in under 100 ms, then routes risky ones to a case review queue. An advanced security and fintech final year project combining streaming features, a rule language and model evaluation.

Difficulty

Advanced

Needs a team, real planning, and a supervisor who knows the area.
Effort

2 semesters · 3 to 4 students

Deliverables

7 to ship

3 optional extras

Suggested stack

Go or JavaKafka or RedpandaRedisPostgreSQLPython with LightGBMReactGrafana
A suggestion, not a requirement. Swap anything for what you already know.

What you should ship

  • A scoring API that accepts a transaction event and returns allow, review or block with reasons, with p99 latency under 100 ms at a stated load
  • A small rule language (or JSON rule format) with a parser, validator and versioning, so analysts can write rules like velocity limits, new device plus high amount, or many new recipients in an hour
  • A streaming feature pipeline computing per-user and per-device counters over sliding windows (for example 1 hour, 24 hours, 7 days) stored in Redis
  • A machine learning model trained on a public or synthetic fraud dataset, served alongside rules, with its score available to rules as a feature
  • Shadow mode: new rules run on live traffic without affecting decisions, and the dashboard shows what they would have flagged
  • A case review UI where analysts see flagged transactions with feature values and history, and mark fraud or not fraud, feeding labels back
  • An evaluation report with precision, recall and cost-weighted loss for rules only, model only and combined, plus latency under load

If you have time left

  • Graph features: shared devices or phone numbers linking accounts into possible mule rings
  • Backtesting a new rule against the last 30 days of stored events before enabling it
  • Step-up actions such as asking for a passkey confirmation instead of blocking

The problem fintech startups have with fraud

A new wallet, payments or lending startup launches, grows, and within months meets organised fraud: stolen accounts used to move money to mule accounts, promo abuse with hundreds of new sign-ups from one device, card testing, and social engineering where the real user is tricked into sending money. Payment networks and regulators expect the startup to have controls. Early on, "controls" is an engineer adding if statements to the payment service and redeploying.

That approach breaks quickly. Rules pile up, nobody knows which ones still catch anything, and every change needs a deploy. Meanwhile losses land on the startup's balance sheet.

What already exists and the gap

  • Stripe Radar: machine learning fraud scoring plus custom rules, evaluated in well under a second, but only for payments processed through Stripe.
  • SEON and Sift: fraud platforms offering device and digital footprint signals, rules and models. Strong products, priced for companies with volume and budget.
  • Uber's Mastermind (described on Uber's engineering blog): an in-house rules engine that let analysts write and deploy rules within minutes. The pattern is well documented but you have to build it.
  • Open source rule engines: general purpose engines exist, but not with streaming fraud features, shadow mode and case review wired together.

The gap is an engine a startup on local rails (bank transfers, wallets, cash-in agents) can run itself, following the rules-plus-model pattern that Stripe and Uber describe, with analysts able to change rules without engineers.

What you build

Roles: payment service (calls the API), fraud analyst (writes rules, reviews cases), admin.

  1. The payment service sends each transaction event (user, device, amount, recipient, channel) to the scoring API before completing it.
  2. The engine loads current features for the user and device from Redis, runs the model, evaluates active rules in priority order, and returns a decision with reasons.
  3. Events also go to a stream that updates sliding window counters asynchronously.
  4. Flagged transactions appear in a case queue; analyst labels flow back as training data.
  5. Rules can be created in shadow mode and promoted once their precision is known.

Use a public fraud dataset or generate a synthetic one with a documented simulator that includes realistic fraud patterns. Never use real customer data you do not have permission for.

The technically interesting part

There are two hard problems.

Consistent features at low latency. The counters the model was trained on must match the counters computed live, or the model degrades silently. Design the feature definitions once and use them both for offline training and online serving, and test that they agree. Handle late and duplicate events without double counting.

The rule language and its safety. Rules written by analysts must not be able to crash the engine or take a second to evaluate. Parse, validate and compile rules, cap their cost, and version them so every decision records which rule set produced it.

How to evaluate it

  • Latency: p50, p95 and p99 of the scoring API under a load test at a stated transaction rate.
  • Detection: precision, recall and a cost-weighted metric (fraud loss prevented minus cost of reviewing and blocking good users) for rules only, model only, and combined.
  • Feature consistency: offline versus online feature values on replayed events, with the mismatch rate reported.
  • Analyst workflow: time for a classmate acting as analyst to write, shadow test and promote a new rule.

Suggested plan

  1. Weeks 1 to 4: dataset or simulator, fraud patterns, feature definitions.
  2. Weeks 5 to 10: scoring API, Redis features, streaming counters.
  3. Weeks 11 to 15: rule language, parser, validator, versioning.
  4. Weeks 16 to 20: model training and serving, shadow mode.
  5. Weeks 21 to 24: case review UI and label feedback.
  6. Weeks 25 to 28: load tests, evaluation, write-up.

Path to a product

The first customer is an early-stage fintech, lending app or marketplace handling payouts, which needs controls to satisfy a bank partner. Offer a self-hosted licence plus support, or a hosted plan priced per thousand scored events. Rule templates for common local fraud patterns are a differentiator.

Scope warning

Do not build a payment processor, KYC system or device fingerprinting SDK. Do not chase model accuracy on a benchmark at the expense of the engine; the system is the project. Do not use scraped or leaked transaction data.

Learn what you need on Sefism

Get help with this idea

Scoping a security project is mostly about deciding what you will not defend against and how you will prove the rest works. If you want a second opinion on scope, stack or your evaluation plan, a mentor can review it with you; you still build it yourselves. New to Sefism? Create a free account first.

Ideas and guidance, not finished projects

These are project ideas and scoping guidance, published free for students to use as a starting point. I do not build, write, or sell final-year projects, and I do not complete coursework for anyone. Take an idea, make it yours, and build it.

Not sure this one fits you?

I help students pick an idea that matches their skills and their deadline, then scope it down until it is finishable. Guidance only, never done for you.

Discuss this idea
Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.