📝 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
✅ 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
- • 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
💡 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