KatInterview

Design an End-to-End Loan Origination Platform

System DesignModel answer
HardModel answerSystem Designsystem-designfintechworkflow-orchestration

Last updated

Architect a durable, compliant loan origination system covering product selection, application intake, automated underwriting, third-party data pulls, decisioning, and disbursement.

The Scenario

You are the founding engineer at a small lending startup. The business offers two products: term loans and merchant cash advances to small businesses. Leadership wants a platform that handles everything from a borrower viewing loan options to money hitting their bank account.

What to Design

Walk through the full origination lifecycle:

  1. Product browsing — borrowers see available products and indicative eligibility based on their business profile.
  2. Application intake — collecting business details, KYC/KYB information, requested amount, and explicit consent to pull third-party data.
  3. Data acquisition — integrating with a credit bureau and a bank-data aggregator (think Plaid-style) to pull credit reports and transaction history.
  4. Underwriting — automated scoring and policy rules, with a fallback path to a human review queue for borderline cases.
  5. Decisioning and offer — generating an offer (amount, fee, repayment schedule) and presenting it to the borrower for acceptance.
  6. Document signing and disbursement — routing to an e-sign vendor, then funding via ACH, RTP, or wire, recorded in a ledger.

Assumptions to State Up Front

Make explicit assumptions about scale before designing. As a reference point, a small lender might process tens of thousands of applications per month, disburse tens of millions of dollars, and see roughly 10–20% of applications require manual review.

What a Strong Answer Covers

  • Requirements clarification — functional scope, non-functional priorities, scale assumptions.
  • API design — key endpoints with idempotency handling.
  • Data model — tables for applications, events, external requests, underwriting results, offers, loans, payments, and a ledger.
  • Architecture diagram — services, async communication, external integrations.
  • Application state machine — all valid states and transitions.
  • At least two deep dives, chosen from: durable workflow orchestration, external integration reliability, underwriting pipeline, exactly-once disbursement, PII handling, or audit/compliance.

You are not expected to design for massive internet-scale throughput. The hard problems here are workflow correctness, third-party reliability, and regulatory compliance.

Hints

Hint 1

Before touching architecture, nail down the non-functional priorities. At a small lender's volume, the bottlenecks are slow third parties and correctness guarantees, not raw throughput. State this explicitly — it shapes every design choice that follows.

Hint 2

Model the application as a state machine first. List every state (including terminal ones like DECLINED, WITHDRAWN, EXPIRED) and every valid transition before drawing any service boxes. Transitions should update status, append an audit event, and emit an outbox message atomically in a single DB transaction.

Hint 3

For disbursement, the core constraint is exactly-once execution — you must never fund the same loan twice. Think about how an idempotency key on the payments table, combined with a double-entry ledger, gives you both the safety guarantee and the audit trail regulators expect.