All posts
Fintech
4 min read• 11/4/2026

Killing the Batch Window: Event-Sourced Rails for FedNow & RTP

Tossing T+1 settlement out the window requires tearing down legacy batch jobs and running idempotent, event-sourced ledgers engineered for sub-second clearing.

Share X LinkedIn

Tip: use ← / → to browse posts.

Killing the Batch Window: Event-Sourced Rails for FedNow & RTP
## The Fiction of Real-Time Balances Most modern consumer fintech applications lie to their users. When an end user sees their updated balance within milliseconds of a swipe or transfer, they are looking at an optimistic write applied to a cached read-model. Behind the curtain, the core banking system is still wheezing through nocturnal batch jobs, reconciling flat files dropped onto an SFTP server at 02:00 UTC. With FedNow and RTP operating around the clock, this architectural sleight of hand is falling apart. Instant settlement rails do not care about your clearing window. If a transaction clears in 350 milliseconds across an ISO 20022 message payload, your ledger must guarantee immutability, zero double-spend, and immediate settlement verification without waiting for an end-of-day reconciliation sweep. Building for instant payment rails requires ripping out the classic relational ledger pattern—where tables update balances via row-locking SQL operations—and replacing it with a deterministic, append-only event-sourced architecture. ## The Breakdown of Mutating Ledgers Under legacy relational architectures, moving money between account A and account B typically looks like this: 1. Open a database transaction. 2. `SELECT balance FROM accounts WHERE id = A FOR UPDATE` 3. Decrement A's balance. 4. Increment B's balance. 5. Write two audit records to an activity log. 6. Commit. This pattern collapses under high concurrent throughput across distributed rails. The moment multiple payment rails (ACH pulls, card authorisations, FedNow credit transfers) hit the same hot account simultaneously, lock contention skyrockets. When deadlocks occur, retry storms degrade the system, leading to dropped ISO 20022 pacs.008 messages or, worse, duplicate execution. ### The Idempotency Imperative in ISO 20022 Instant settlement rails expect absolute determinism. When sending an outgoing credit transfer, you must provide an `EndToEndIdentification` and an `InstructionIdentification` that remain stable across network partitions and system retries. If your database times out after dispatching the wire payload, you cannot simply retry with a new transaction ID without risking multiple real-dollar outflows. Your ledger must decouple intent from execution, transforming payment operations into a strictly ordered sequence of irreversible events. ```rust pub struct JournalEntry { pub entry_id: Ulid, pub transaction_ref: String, pub account_id: Uuid, pub direction: EntryDirection, pub amount_cents: i64, pub rail: SettlementRail, pub iso_tx_id: String, pub timestamp: DateTime<Utc>, } ``` ## Core Architecture: The Append-Only State Machine In our studio's production fintech deployments, balances are never stored as mutable numbers in an accounts table. A balance is an ephemeral computation: the projection of an immutable stream of ledger entries. ### 1. Partitioned Event Log To handle tens of thousands of incoming settlement events per second, partition your event log by account routing shard or account tenant identifier. Each ledger partition processes instructions sequentially through an in-memory state machine using actor frameworks (such as Tokio actors in Rust or GenServer pools in Elixir). * **Deterministic Sequencer:** An in-memory queue validates against the latest snapshot before emitting a `TransferCommitted` event. * **Optimistic Concurrency with Vector Clocks:** If two deposits arrive simultaneously, the sequence guarantees total ordering without distributed locks. * **Durable Wal Writes:** Events must hit synchronous disk writes (via a high-throughput write-ahead log like Kafka, Redpanda, or Raft-backed TigerBeetle) before acknowledging the ISO receipt. ### 2. The Command/Query Separation Read operations should never touch the write pipeline. Project committed ledger entries into an OLAP store (such as ClickHouse) or read-heavy distributed caches (Redis Cluster with read replicas) to drive merchant dashboards, mobile balance lookups, and compliance reporting. Even if downstream read projections lag by 15 milliseconds, the underlying core engine remains mathematically sound. The ledger guarantees that an account cannot drop below its credit limit, regardless of how fast API calls saturate the network. ## Handling Multi-Rail Asymmetry Real-world fintech requires handling mixed settlement mechanics. While FedNow settles gross transactions in real-time, incoming ACH debits can still be returned five days later, and card networks settle net batches hours after authorization. To manage this asymmetry without corrupting core balances: * **Isolate Ledger Buckets:** Split every customer account into three distinct balance types: `posted`, `pending_clearing`, and `encumbered`. FedNow deposits write directly to `posted`. Inbound ACH credits write to `pending_clearing` and move to `posted` via an automated rule engine after the dispute window decays. * **Cryptographic Traceability:** Generate a continuous hash chain (Merkle tree) across all entries in an account partition. Every night, seal the partition and publish the root hash to cold storage. If any balance discrepancy or internal fraud attempt occurs, the chain breaks instantly. * **Self-Healing Reconciliation Daemons:** Run asynchronous workers that continuously compare local ledger state with incoming ISO 20022 camt.053 bank statement files. Flag discrepancies immediately through automated alerting systems rather than waiting for an accountant's spreadsheet. ## Moving Past Legacy Constraints Batch windows exist because legacy hardware could not calculate global state while servicing live writes. That constraint vanished a decade ago. Building a modern financial platform on top of mutating rows and overnight clearing jobs is technical debt disguised as standard practice. Treat ledger transactions as immutable logs, treat balances as deterministic projections, and instant settlement becomes an operational advantage rather than an engineering nightmare.
fintech
iso20022
event-sourcing
payments
Share X LinkedIn

What clients say

Real reviews from founders and teams we've shipped with.

5.0 · 6 reviews
"The trading store is fast, secure, and converts. Hashim genuinely understands fintech."
Daniel O.
CEO, FX TradeStore
"Our short-link platform launched flawlessly. Incredible performance and clean UX out of the box."
Neha S.
Product Lead, iShortURL
"Delivered a scalable app directory that keeps growing. Best engineering partner we've had."
Priya V.
Founder, AppsWant
"Supabase + TanStack Start setup was production-ready on day one. Auth, RLS, everything."
Marcus D.
CTO, Ledgerly
"XAUUSD Trade runs like clockwork. The infra and UI decisions were spot on."
Anastasia P.
Head of Product, XAUUSD Trade
"Live streaming forex content was a huge lift — Hashim delivered without a single hitch."
Yusuf K.
Founder, Live Forex TV