← Back to All Questions
Very Hard~60 minFinTech & Banking

Design Wire Transfer System

StripeWisePayPalJPMorganGoldman SachsSquarePlaidRevolut

📝 Problem Description

Design a wire transfer system that handles domestic and international transfers. Ensure ACID properties, handle failures, integrate with banking networks (SWIFT, ACH), and comply with regulations. Key challenges include: - **Exactly-Once Processing**: Ensuring funds are transferred exactly once, never lost or duplicated - **Distributed Transactions**: Coordinating across multiple services and external banking networks - **Regulatory Compliance**: AML/KYC checks, OFAC screening, and suspicious activity reporting - **Failure Recovery**: Handling network failures, timeouts, and partial failures gracefully - **Idempotency**: Safe retries for failed requests without double-processing - **Audit Trail**: Complete, immutable record of all financial transactions

👤 Use Cases

1.
User wants to initiates wire transfer so that transfer queued for processing with idempotency key
2.
System wants to validates sender balance so that funds placed on hold, balance reserved
3.
System wants to performs AML/KYC checks so that transfer screened against watchlists
4.
System wants to submits to banking network so that transfer sent via SWIFT/ACH
5.
System wants to receives confirmation so that funds debited, recipient credited
6.
Compliance wants to flags suspicious transfer so that transfer held for manual review
7.
User wants to checks transfer status so that real-time status with tracking
8.
System wants to handles network failure so that saga rollback, funds released

✅ Functional Requirements

  • Initiate domestic (ACH) and international (SWIFT) transfers
  • Real-time balance validation and fund reservation
  • Idempotent transfer operations (safe retries)
  • Complete, immutable audit trail for all transactions
  • Real-time notification on status changes (email, push, SMS)
  • Support for recurring/scheduled transfers
  • Multi-currency support with FX conversion
  • Beneficiary management and validation
  • Transfer cancellation (before settlement)
  • Compliance screening (AML, KYC, OFAC, PEP)
  • Fee calculation and disclosure
  • Transfer limits enforcement (daily, monthly, per-transaction)

⚡ Non-Functional Requirements

  • Zero fund loss (exactly-once processing with saga pattern)
  • 99.99% availability (52 min downtime/year)
  • Domestic ACH: complete in 1-2 business days
  • Same-day ACH: complete within hours
  • International SWIFT: complete in 1-5 business days
  • Transfer initiation latency: < 500ms
  • Compliance screening: < 2 seconds
  • RPO = 0 (no data loss), RTO < 5 minutes

⚠️ Constraints & Assumptions

  • Must be ACID compliant for financial transactions
  • External banking networks (SWIFT, ACH) are unreliable and asynchronous
  • Regulatory holds can delay transfers indefinitely
  • Cross-border transfers subject to multiple jurisdictions
  • Banking network cutoff times (ACH: 5pm ET, SWIFT: varies)
  • Correspondent banking relationships affect routing
  • FX rates volatile and must be locked at initiation

📊 Capacity Estimation

👥 Users
10M users, 1M transfers/day
💾 Storage
10TB (transactions, audit logs)
⚡ QPS
Initiate: 100/sec, Status check: 1000/sec
📐 Assumptions
  • 1M transfers per day peak
  • Average transfer amount: $5,000
  • 85% domestic (ACH), 15% international (SWIFT)
  • 7-year retention for regulatory compliance
  • Average 3 status checks per transfer
  • 0.5% transfers flagged for compliance review
  • 99.9% transfers complete successfully

💡 Key Concepts

CRITICAL
Saga Pattern
Distributed transactions with compensating actions. Each step has a compensation function. On failure, compensations run in reverse order to undo partial work.
CRITICAL
Double-Entry Bookkeeping
Every credit has corresponding debit. Total debits always equal total credits. Enables reconciliation and audit.
CRITICAL
Idempotency
Same request with same idempotency key produces same result. Safe to retry failed requests without duplicate processing.
HIGH
State Machine
Transfer moves through defined states with valid transitions. Invalid transitions rejected. State changes recorded for audit.
HIGH
Hold/Reserve Pattern
Funds placed on hold before network submission. Hold released on failure, converted to debit on success.
HIGH
Reconciliation
Compare internal records with external statements. Identify and resolve discrepancies. Required for financial audits.
MEDIUM
Correspondent Banking
Banks use intermediary banks for cross-border transfers. Nostro/Vostro accounts track balances between banks.

💡 Interview Tips

  • 💡Start with the saga pattern for distributed transactions
  • 💡Emphasize idempotency - this is critical for financial systems
  • 💡Discuss fraud prevention and compliance early
  • 💡Be prepared to explain double-entry bookkeeping
  • 💡Know the difference between domestic and international transfers
  • 💡Understand SWIFT, ACH, and other payment networks