Putting the Tech in Fintech: How We Use FIX to Execute Trades at Scale
Wealthfront executes trades with brokers through a four-layer stack: dedicated network links with one persistent TCP socket per broker session, the FIX 4.2 Tag=Value protocol, a customized fork of the QuickFIX/J engine, and an internal translation layer. QuickFIX/J handles socket management, sequence-number gap detection with ResendRequests, JDBC message logging and custom dictionary tags, such as a bilaterally agreed tag for fractional share quantities. The application layer uses Builder and Visitor patterns to map FixOrder domain objects into FIX messages, and routes execution reports to handlers that write an auditable FixOrderEvent lifecycle. New brokers are rolled out in stages: UAT, then the ZVZZT test ticker, then firm accounts, then a gradual ramp of client volume.
Related posts
- 10 Tips for Building Resilient Payment Systems
Shopify Engineering mediumAdeptTen lessons from Shopify's payment infrastructure for keeping payment systems reliable at scale. Start with low timeouts everywhere: about 1s to open a connection and 5s to read, write or query. Use circuit breakers via Semian, keyed per merchant country so one local acquirer outage stays isolated, and reason about capacity with Little's Law. Track the four golden signals, use structured logs with correlation IDs, and make retries safe with idempotency keys. ULID keys cut INSERT time by 50% versus UUIDv4. The rest covers reconciliation anomalies, load testing against a simulated benchmark gateway, checkout throttling, and incident management and retrospectives.
- Introducing the commerce payments protocol
Shopify Engineering mediumAdeptThe Commerce Payments Protocol, built by Coinbase and Shopify on Base, brings card-style authorize-and-capture flows onchain using an immutable escrow smart contract between payer and receiver. Operators submit transactions and pay gas on behalf of merchants but are constrained: payers sign a hash of the payment terms (receiver, token, max amount, expiries, operator), signatures cannot be replayed, payers can reclaim funds after authorization expiry, and each operator's funds sit in separate buckets. Six operations (authorize, capture, charge, void, reclaim, refund) cover the payment lifecycle, with partial captures and ERC-3009 signature-based token collection enabling gasless USDC payments. The protocol powers Shopify's USDC payment method and is open for extension via operator, receiver and token-collector contracts.
- Beyond Test Cards: A Fake Payment Provider for Testing at Scale
Lyft Engineering mediumAdeptLyft built a Fake Payment Provider that implements the same provider interface as real processors (tokenize, authorize, increment, capture, charge, refund, void), so it can simulate partial failures, soft declines with retries, pending responses, timeouts and outages that processor test cards cannot. Each test scenario is encoded into a fake low-value token, persisted as a high-value token, and kept stable across the charge lifecycle. Scenarios are dictionaries of per-action specs with success predicates (including a 50% chaos mode), delays, network decline codes and per-attempt retry specs. Strict routing rules confine the fake to simulated users. That lets it run safely in production for load testing the full payment stack, and new scenarios can be added through an AI coding skill whose output still goes through code review.
- Scaling Shopify's BFCM Live Map: An Apache Flink Redesign
Shopify Engineering mediumAdeptShopify scaled its Black Friday/Cyber Monday live sales map by putting Apache Flink in front of Cricket, its home-grown Go stateful streaming service. Flink filtered the checkout Kafka stream so Cricket processed only about one percent of the events, and Flink also computed new metrics such as product trends and unique shoppers. The Flink jobs used cross-region sharding and active-active deployment, handled load tests of 1M events/sec and ran with 100% uptime through BFCM, with Spark batch jobs as a fallback. Redis used for broadcasting to browsers still became a bottleneck and briefly clogged in production, so the planned redesign moves all metrics into Flink and snapshots them to a store that a web tier serves from an in-memory cache.
- Writing High-Performance Clients for Tigerbeetle
TigerBeetle mediumAdeptTigerBeetle builds every language client as a thin wrapper over a single Zig client library, tb_client, exposed through FFI. This avoids reimplementing the VSR protocol, io_uring and static allocation in each language. Zero-deserialization works directly with Go and C# structs. Java instead uses a ByteBuffer-backed Batch object so JNI can read contiguous memory without per-object copying or GC pressure. tb_client runs a dedicated thread with completion callbacks, which each binding wraps in its own concurrency idiom: goroutines, async/await and CompletableFuture. A client-side benchmark of 1M rejected transfers shows near-native throughput (Zig 1.56M/s, C# 1.52M/s, Go 1.47M/s, Java 1.27M/s). Zig's cross-compilation offsets the cost of per-platform builds.