GoBank — Model Bank Simulation

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.

What is this?

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.

Current Aims

Customer behaviour modelCustomers 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 managementCapital raise function. Minimum £5M to operate as a bank. UK 4.5% tier 1 capital ratio constrains lending beyond organic retained profits.
Interest ratesPre-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 & reconciliationPayment cycles, internal and external user actions with audit trail.
Deployment doneWASM (GitHub Pages) and local server.
RBAC doneAdmin role currently; infrastructure in place for future roles.
Accounting donego-luca integration with accounting hierarchies and parameter hierarchies.

Future Scope

Multiple user rolesBeyond the current admin role.
Annual accountsRetained profits feeding tier 1 capital.
Tax statementsModel corporation tax on profits.
Blue-green deploymentDB migrations then code migrations, compile-time verified, reversible at scale. Same pre-calculation approach as interest rates — migration is a time point.
Log archivalRemoving old data from active state.
Accounting data archivalgo-luca: only current pool in DB for scale; timelines live ~7 years then archived.
Customer reputation spikesRicher modelling of acquisition surges.

Non-Goals

Kubernetes / CloudSQLNo planned deployment to Kubernetes with CloudSQL.
External identity providersNo planned connection of RBAC to GCP IAM or similar.
Restoring archived dataData archived beyond 7 years is not planned to be restorable.