Problem
What needed to change
The startup needed an end-to-end customer workflow: complete KYC, fund accounts, allocate deposits across multiple strategies, execute trades, and generate confirmations + statements — while maintaining data integrity across many asynchronous steps.
Approach
Architecture + execution
- Integrated Alpaca as the custodian/brokerage layer and Plaid for account linking + ACH fund transfers.
- Implemented an atomic account/ledger model to ensure data integrity across deposits, allocations, fills, fees, and reversals.
- Built strategy-aware allocation and automated trading flows with clear state machines, reconciliation, and idempotent processing.
- Automated trade confirmations and periodic account statement generation with evidence-ready audit trails.
- Shipped a complex KYC workflow with step-level tracking, retries, and operational tooling for exceptions.
- Deployed on GCP Cloud Run for scalable services and used Pub/Sub for asynchronous workflow processing and backpressure handling.
Results
Outcomes that held up
- Enabled end-to-end customer funding → allocation → trading flows with reliable, auditable system behavior.
- Improved correctness under concurrency using atomic account primitives and idempotent async processing.
- Reduced operational load by automating confirmations, statements, and exception-handling workflows.