Real-time balance engine¶
| ID | MOD-003 |
| System | SD01 |
| Repo | bank-core |
| Build status | Deployed |
| Deployed | Yes |
| Last commit | 35402a8a7d9c6f1e2b5c8d0e4f7a3b6c9d2e5f8a |
Customer and nostro balances updated synchronously on each ledger posting. Balance available via API within milliseconds of posting.
balance_updated event (v1.1.0)¶
MOD-003 consumes bank.core.posting_completed (from MOD-001) and re-emits bank.core.balance_updated v1.1.0 on every posting that affects a deposit account. The event carries the full before/after snapshot:
previous_ledger_balance+ledger_balance— balance before and after the postingprevious_available_balance+available_balance— available balance before and afterposting_id— the causal posting reference, used as the idempotency sequencetrace_id,correlation_id,jurisdiction,effective_at— context fields added in v1.1.0
No producer-side filtering is applied — all deposit account postings trigger an event. Consumers apply EventBridge detail-pattern filters for their specific use case (e.g. MOD-117 filters to accounts with an active overdraft facility).
The event is backwards-compatible with v1.0.0 consumers (MOD-070, MOD-077, MOD-032, MOD-042) — the new fields are additive. See event-catalogue.md §bank.core.balance_updated for the full field spec.
Module dependencies¶
Depends on¶
| Module | Title | Required? | Contract | Reason |
|---|---|---|---|---|
| MOD-001 | Double-entry posting engine | Required | — | Derives account balances by aggregating posted ledger entries from the posting engine. |
| MOD-002 | Immutable transaction log | Required | — | Reads the immutable transaction log to compute current balance positions. |
| MOD-104 | AWS shared infrastructure bootstrap | Required | — | AWS shared infrastructure provisioned by MOD-104 (EventBridge buses, S3, KMS, Kinesis, Cognito) is required before this module can be deployed. |
| MOD-103 | Neon database platform bootstrap | Required | — | Neon database and schema provisioned by MOD-103 must exist before this module can read or write Postgres. |
Required by¶
| Module | Title | As | Contract |
|---|---|---|---|
| MOD-005 | Daily accrual calculator | Hard dependency | — |
| MOD-020 | Pre-payment validation suite | Hard dependency | — |
| MOD-077 | Account dashboard & insight feed | Hard dependency | — |
| MOD-082 | Nostro & FX treasury management | Hard dependency | — |
| MOD-110 | Fee engine | Hard dependency | — |
| MOD-113 | Statement generation | Hard dependency | — |
| MOD-117 | Overdraft management engine | Optional enhancement | — |
| MOD-120 | PayID and Osko integration | Hard dependency | — |
| MOD-123 | ATM network integration | Hard dependency | — |
| MOD-129 | Teller operations and branch cash management | Hard dependency | — |
| MOD-137 | Agency banking adapter | Hard dependency | — |
| MOD-141 | Intra-bank transfer engine | Hard dependency | — |
| MOD-142 | Deposit guarantee scheme disclosure | Hard dependency | — |
| MOD-159 | Synthetic transaction engine | Hard dependency | — |
Policies satisfied¶
| Policy | Title | Mode | How |
|---|---|---|---|
| CLQ-002 | Liquidity Risk Management Policy | CALC |
Liquidity monitoring uses live balances — no stale data risk in LCR calculation |
| PAY-001 | Payment Operations Policy | GATE |
Sufficient funds check uses real-time balance before authorising any payment |
| CON-005 | Fee & Pricing Transparency Policy | AUTO |
Customer-visible balance is always accurate and current — no lag between transaction and display |
| CLQ-004 | Interest Rate Risk in the Banking Book (IRRBB) Policy | CALC |
IRRBB repricing model uses live rate-sensitive balance positions |
Capabilities satisfied¶
| Capability | Title | Mode | How |
|---|---|---|---|
| CAP-082 | Interest offset calculation | CALC |
Reads the live deposit balance and subtracts it from the linked loan principal before the accrual calculator runs daily interest. |
Part of SD01 — Core Banking Platform
Compiled 2026-05-22 from source/entities/modules/MOD-003.yaml