A model bank built in Go that simulates retail banking operations at scale. Part game — how profitable can you run a bank? — and part engineering testbed for go-luca.
GoBank simulates a UK retail bank: savings, lending, payments, treasury, and full double-entry accounting. It runs in the browser via WASM or as a local HTTP server. You set interest rates, raise capital, and compete for customers against a market modelled on the BoE base rate.
| Customer behaviour model | Customers search, compare, switch, and stick based on rate competitiveness, bank reputation, and capitalisation health. Random acquisition spikes when rates are very attractive. Competitive landscape: other banks offer BoE base rate minus a spread; customers compare and switch on relative attractiveness. |
|---|---|
| Capital management | Capital raise function. Minimum £5M to operate as a bank. UK 4.5% tier 1 capital ratio constrains lending beyond organic retained profits. |
| Interest rates | Pre-calculated at rate-change time points. Negative rate support (Japan-style). Parameter hierarchies for rate setting (go-luca). |
| SCV (Single Customer View) | FSCS regulatory report: all depositor details and aggregate balances within 24 hours of failure. Proving this at scale (100K+ customers) using CTE-based SQL. To be extracted from go-luca into a standalone sub-project incorporated into GoBank. |
| Logging & reconciliation | Payment cycles, internal and external user actions with audit trail. |
| Deployment done | WASM (GitHub Pages) and local server. |
| RBAC done | Admin role currently; infrastructure in place for future roles. |
| Accounting done | go-luca integration with accounting hierarchies and parameter hierarchies. |
| Multiple user roles | Beyond the current admin role. |
|---|---|
| Annual accounts | Retained profits feeding tier 1 capital. |
| Tax statements | Model corporation tax on profits. |
| Blue-green deployment | DB migrations then code migrations, compile-time verified, reversible at scale. Same pre-calculation approach as interest rates — migration is a time point. |
| Log archival | Removing old data from active state. |
| Accounting data archival | go-luca: only current pool in DB for scale; timelines live ~7 years then archived. |
| Customer reputation spikes | Richer modelling of acquisition surges. |
| Kubernetes / CloudSQL | No planned deployment to Kubernetes with CloudSQL. |
|---|---|
| External identity providers | No planned connection of RBAC to GCP IAM or similar. |
| Restoring archived data | Data archived beyond 7 years is not planned to be restorable. |