Monetary System (as shipped)
Summary#
Player guides: Central Banks, The FOMC, Currency Exchange, Savings Interest and Line of Credit.
Money in A House Divided runs on four connected systems: a central bank per currency that sets a prime rate (by committee in the US, by a single chair or the government elsewhere), a forex market where every active currency floats against an internal anchor, savings that pay a real (inflation adjusted) rate, and a line of credit whose price is that same prime rate plus a credit spread. This page describes what is in the code today, with the real constants and the files they live in.
One turn is one real hour (MS_PER_TURN = 60 * 60 * 1000) and a game year is 48 turns (TURNS_PER_YEAR = 48), both in and re-exported from . Every rate and accrual below is expressed against that clock.
The prime rate a chair or committee sets is not a dial in isolation. It feeds the macro target that moves the currency's exchange rate, sets the savings yield through the real rate formula, and sets the base cost of every line of credit in that currency. Savings deposits become the lending pool that limits how much credit exists, and forex trade fees become the reserve stack that decides which currency is the leading exchange currency and therefore trades calmest. A hike tightens credit, strengthens the currency, pays savers more in real terms and shrinks the borrowing pool through the debt-to-income cap. Money supply aggregates and quantitative easing are on Money Supply and QE.
Rules#
Which bank backs which currency#
Each currency has exactly one bank behind it. The mapping is explicit, not derived: COUNTRY_CURRENCY_MAP gives every country its home currency, and CURRENCY_ANCHOR_COUNTRY names the single country whose exchangeRates document and central bank are authoritative for that currency (both in , re-exported by ). Scotland and Wales are sterlingized: they use GBP with the UK as anchor. The Soviet ruble (SUR) is anchored on RU and shared by BLR, UKR and BAL. EUR is anchored on DE, and IE keeps its own IEP so a 1953 Bretton Woods par with sterling can exist without colliding with the DM/EUR rate.
The URL slug /centralbank/[currency] is resolved by resolveCentralBankCurrency in , which also routes to the intorg API when the anchor bank is treaty run (the ECB).
Who may move the rate#
Authority is decided by one pure state machine, decideGovernance in . is the single write path: it loads the bank, resolves the actor (admin, government, chair or governor) and the inputs, asks the machine, and writes the result. The machine checks in this order:
- Admin always has authority and skips the delta, cooldown and term limits below.
- Government controlled bank: only the head of government or the finance seat (via
isNationalIssuer) may act. The chair is told the bank has no operational independence. - Command economy (
gameConfig.commandEconomyEnabledand marketization belowCOMMAND_CEILING): nobody sets an independent rate (409). - Seated committee: if the board has at least one seated governor (
boardCanCarry), the rate moves only by committee vote. A direct set is refused withcommittee-decides. A board with no seated governors is dead, so the chair sets the rate directly. - Chair: the seated chair may act unless
chairControlsLockedis set by an administrator. - Exchange-rate regime (the impossible trinity): a currency that is pegged or in an intervention band with an open capital account has no independent policy rate, and the change is refused (
rateChangeRefusalin ). Admins skip this gate.
Who may be a government setter, the finance seat or a Senate confirmer follows from Elections and Cabinet.
Prime rate limits#
Non-admin changes obey these limits, all in unless noted:
| Constant | Value | Meaning |
|---|---|---|
PRIME_RATE_STEP |
0.25 | Rates snap to a quarter-point grid |
PRIME_RATE_CEILING |
25 | Ceiling; the floor is 0 |
MAX_RATE_CHANGE_DELTA |
0.75 | Largest hike per adjustment, and the threshold above which a cut is "aggressive" |
NPP_CHAIR_HIGH_INFLATION_HIKE_DELTA |
3 | Hike cap once inflation is at least 5 points over target (the gap constant NPP_CHAIR_HIGH_INFLATION_GAP = 5 is file-local) |
MAX_RATE_CUT_DELTA |
1.75 | Largest cut per adjustment |
AGGRESSIVE_CUT_SCRUTINY |
10 | Added to chairInfamy for a cut deeper than 0.75 |
RATE_CHANGE_COOLDOWN_TURNS |
6 | One change every 6 turns |
RATE_CHANGES_PER_TERM |
16 | Executed hikes and cuts per term; holds are free |
INTERFERENCE_SCRUTINY |
12 | Added to chairInfamy when the government sets the rate () |
RATE_HISTORY_MAX |
96 | Entries kept in rateHistory |
maxHikeDeltaFor(inflation - target) returns 3 instead of 0.75 once inflation is at least 5 points over target, for chairs, government setters and the committee alike. The same function feeds the rate UI (), so server and screen cannot drift. A cut deeper than 0.75 adds 10 to chairInfamy (capped at 100) unless the government set the rate, in which case the 12 point interference charge applies instead. Why the asymmetry: cutting fast is a political risk for the chair, while a slow hike is the safer default.
Every change appends to rateHistory with the previous rate, the new rate, who changed it and the reason. The requested rate is snapped to the grid and compared with the stored rate snapped the same way, so an off-grid stored rate never blocks the next valid move; a request equal to the current rate is refused as already-at-rate.
Independence of the bank#
encodes the historical case. The Bank of England had no operational independence until BOE_INDEPENDENCE_YEAR = 1997, so a UK world whose era start year is before 1997 opens with the Treasury setting Bank Rate. The default keys on the era start year, not the live year: a 1991 world that plays past 1997 does not flip on its own, because transferring monetary power is a statute. Parliament passes a central_bank_independence provision, and an explicit bank.governmentControlled written by legislation always wins.
A country on a shared bank cannot legislate here at all: canLegislateBankIndependence returns false whenever the country config carries centralBank.sharedBankId. An ECB member cannot rewrite a treaty institution, and a sterlingized Scotland cannot legislate over the Bank of England.
The FOMC committee#
Banks that run a committee do so by design only for the US: FOMC_COMMITTEE_COUNTRY_IDS is {"US"}. Other banks keep the single-chair or government model, because seeding a US-shaped board for them blocked their own legislative rate-setting path (ticket #1195). Constants in :
| Constant | Value |
|---|---|
FOMC_BOARD_SIZE |
7 seats |
FOMC_TERM_TURNS |
192 (four game years) |
FOMC_MEETING_INTERVAL_TURNS |
8 (six meetings per game year) |
FOMC_PLAYER_VOTE_WINDOW_MS |
24 hours of wall clock |
FOMC_VOTE_WINDOW_TURNS |
24, the hard turn deadline |
FOMC_VACANCY_REMINDER_INTERVAL_TURNS |
48 |
populates a US bank without a board: one technocrat NPP per seat (role fomcMember), seat 0 the chair mirrored onto the bank's legacy single chair fields. Alignments alternate hawk, dove, hawk, dove across seats, and term expiries are staggered (seat i of 7 expires (i + 1) / 7 of a term after the start turn) so roughly one seat opens per window. A sitting player chair keeps seat 0. A government-controlled bank gets no committee, and legislation seeds one only for the US: seedFomcBoards skips every bank outside FOMC_COMMITTEE_COUNTRY_IDS before it checks government control, so an independent Bank of England keeps a single governor. Its callers are world bootstrap (seedForex at turn 0) and an independence grant (applyCentralBankIndependenceProvision in ); nothing else seeds a board. Vacated seats are not restaffed by the engine. A governor seat stays vacant until a President nominates and the Senate confirms; a vacant chair seat can also be filled by the chair draw (see Chair selection).
The voting logic in is pure and deterministic. Each seat forms a view by running the same Taylor rule the autonomous chair uses (computeNppChairRateTarget and computeNppChairRateStep in ), tilted by its alignment. A step smaller than FOMC_MOVE_THRESHOLD = 0.125 points reads as a hold. The chair proposes a motion; when the chair cannot change the rate (per-term cap, cooldown, command economy) the motion can only be a hold.
tallyMeeting requires a strict majority of the seated governors: majorityThreshold(n) = floor(n / 2) + 1, so 7 seated need 4 and 5 seated need 3. Vacant seats are excluded from the count. A seated governor with no ballot abstains and counts against the motion, so a divided or apathetic board holds. A meeting is decided once it has passed or can no longer reach a majority, and it never resolves on the turn it opened. NPP seats auto-vote their preference when the meeting opens; player seats vote live or abstain at the deadline.
Alignment is temperament, not ideology. CHAIR_ALIGNMENT_POLICY in :
| Multiplier | Hawk | Dove |
|---|---|---|
inflationCoefMult |
1.5 | 0.6 |
growthCoefMult |
0.5 | 1.5 |
targetInflationDelta |
-0.5 | +0.5 |
hikeStepMult |
1.25 | 0.75 |
cutStepMult |
0.75 | 1.25 |
When no alignment is stored, deriveChairAlignment reads the technocrat's personality: stubbornness at or above ambition leans hawk, otherwise dove. Expired board seats are vacated, not replaced (expireSeats in ). oppositeAlignment is used only when a caretaker chair is appointed on a bank without a board (), flipping the outgoing chair's temperament.
Nominations#
FomcNomination (, lifecycle in , collection fomcNominations) is a President's nomination of a named nominee to a specific seatId, confirmed by the Senate through the same lifecycle as cabinet nominations. It carries makeChair, the occupantType (a live player seat or an autonomous NPP seat) and the hawk or dove alignment the President assigns. A nomination may target any existing seat, vacant or occupied, with one active nomination per seat (). The caller must be head of government of a member country. A player nominee who sits in the cabinet is refused for every US seat (requiresCabinetIndependence in ), and the lifecycle refuses to install one who joined the cabinet in the meantime. NPP senators vote along party lines; at the 24-turn deadline the tally is recomputed and decides. On confirmation the nominee is installed into that seat on fomcBoard, replacing any occupant, with a fresh 192-turn term; makeChair moves the chair flag and updates the chair mirror fields. On rejection the seat is untouched.
The executive draw (CentralBankNomination plus ChairSelectionPending, below) is the main chair path for every bank, and the second route to the Fed chair seat whenever it falls vacant: a vacated chair seat sets vacancyAwaitingAutomaticSelection unless a pick is already pending (mirrorChair in machine.ts), which opens the draw.
Chair selection#
All in unless noted.
Which bank. A country's chair bank is sharedBankId ?? countryId (). DE uses the ECB; Scotland and Wales use the Bank of England. A bank without an intorg scopes its members to its own country, so Scotland, Wales and the UK each nominate into the shared Bank of England pool from their own country only. Ruble-zone banks are national (BLR runs its own Gosbank). Only registered countries run selection, and each bank is processed once per turn.
Nomination (POST /api/country/[code]/central-bank/nominate; the intorg route forwards to it). The caller must hold the first isExecutive office of a member country (the head of government: president, prime minister, chancellor, taoiseach, premier). Cost 1 action point, spent idempotently with the write. At most 3 nominations per bank. The window (isNominationWindowOpen) is open when chair and term are both null, when the bank is NPP-chaired with no player chair, or within the last NOMINATION_WINDOW_TURNS = 48 turns of the term. A nominee must be a player character in a member country, not a cabinet member (getIncompatibleOfficeHolders(db, "bank", ...), the dual-appointment rule), not the head of government, and not already nominated.
Lobbying (POST /api/country/[code]/central-bank/lobby). Any character in a member country may lobby for an existing nominee, minimum 1, paid from liquid cash in the bank country's currency (auto-converted under forex) and refunded if the bank write fails.
The draw. processCentralBankChairSelection runs each turn after the executive-removal sweep. A bank with no pending pick draws when its term has expired (currentTurn >= chairTermExpiresAtTurn), when vacancyAwaitingAutomaticSelection is true (set by resignation, dismissal, an admin action, or an FOMC chair seat going vacant), or on bootstrap (chair null, term null, not NPP mode); otherwise it skips. selectChairCandidate skips this cycle's exclusions, cabinet members, NPPs and every executive in the member countries (heads of government, deputies and ceremonial heads of state). The pick is weighted random with weight 1 + lobbyingTotal / LOBBY_SCALE_FACTOR (LOBBY_SCALE_FACTOR = 500,000), seeded cbchair:<turn>, redraws seeded cbchair-redraw:<country>:<turn>.
Acceptance. A pick becomes chairSelectionPending; the seat's person fields are cleared and the nominee is notified. The nominee has CHAIR_ACCEPTANCE_WINDOW_TURNS = 24 turns. Acceptance refuses a nominee now in executive office or the cabinet. On accept the term runs CHAIR_TERM_TURNS = 192 from that turn, chairMode becomes character, the player takes the chair seat if the bank has a board, and nominations and lobbying are cleared. A decline, or a pick older than 24 turns, runs reselectAfterRefusal: the refused nominee joins this cycle's exclusion list (stored on the pending object, cleared when a chair is seated) and a new draw runs, else the seat is vacant.
No candidates. The US seat is left vacant, never a technocrat. Elsewhere, with NPP autonomy at any level other than off, appointNppChair seats a caretaker technocrat, in player countries too; otherwise the seat is vacant. The caretaker adopts the board chair if a board exists, else reuses or spawns a centralBankChair technocrat with the opposite alignment to the previous chair and a 192-turn term. A caretaker serves its full term: nominations are open during it, but no draw runs until the term expires (centralBankChairSelection.test.ts, "does not redraw every turn while an NPP caretaker is mid-term and nominations exist").
Leaving. The executive-removal sweep () vacates a seated player chair who now holds national executive office and empties their FOMC chair seat, and clears a pending nominee who took executive office; NPP-chaired banks are skipped. Dismissal (dismiss-chair, head of government of a member country, player chairs only) sets scrutiny to min(100, current + 18) and flags the vacancy. Resignation (chair only, also triggered by relocation) empties the FOMC chair seat and flags the vacancy, with no scrutiny change of its own.
Scrutiny across a handover. CHAIR_CHANGE_SCRUTINY_RETAINED = 0.75 () is applied as $mul on chairInfamy in persistVacancy, in persistPendingProposal (every proposed pick, redraws included) and at acceptance. A normal handover therefore keeps 0.75 * 0.75 = 56.25%, and each decline or lapse multiplies again. See Known issues.
Government control and command economies. Selection checks neither: a government-controlled bank or a Gosbank still gets a chair the same way, but the governance machine keeps rate-setting with the government, or blocks it in a command economy. A euro member's own independence law is a no-op for rate-setting.
The rate corridor readout#
answers one question at a glance: is the bank ahead of inflation? corridorVerdict(primeRate, inflation) takes the delta, and with NEUTRAL_BAND = 0.5 calls it restrictive above +0.5 points, accommodative below -0.5 and neutral in between. inflationTrendLabel reads the last TREND_WINDOW = 12 observations and reports cooling, rising or steady on a TREND_THRESHOLD = 0.15 point move. Both are computed, never editorial.
Reserves and the reserve currency ranking#
A bank holds these pools: reserveBalance (home currency lending reserves), forexRevenue (home currency fee income) and spreadFeeReserveBalances (foreign currency accumulated from forex spread fees). builds the portfolio view, converting each foreign balance to the home currency through the live rate map (convertCurrencyAmount goes through the internal anchor: amount / fromRate * toRate, and returns 0 if either rate is unusable) and reporting each currency's share of the FX reserve stack, plus home only, foreign only and total views.
ranks currencies by how much of them is held in reserves across every central bank. It deliberately counts only spreadFeeReserveBalances, not reserveBalance: the home lending reserve is a country stuffing its own currency into its own bank, and counting it would let one large domestic balance crown the leading exchange currency regardless of international demand. Totals are valued in the internal anchor (units divided by the rate), and getLeadingReserveCurrency returns the number one, or null when no bank holds rankable FX reserves.
Rank pays. RESERVE_CURRENCY_VOLATILITY_REDUCTIONS = [0.5, 0.25, 0.125] in means the leading exchange currency trades 50% calmer, the second 25% calmer, the third 12.5% calmer, and everything else takes the full market jitter.
Chairs can move money between forexRevenue and reserveBalance, with limits in :
| Constant or rule | Value |
|---|---|
RESERVE_POOL_TRANSFER_COOLDOWN_TURNS |
TURNS_PER_DAY = 24 |
RESERVE_POOL_TRANSFER_MAX_FRACTION |
0.5 of the source pool per action |
| Forex to lending | at most floor(forexRevenue * 0.5) |
| Lending to forex | at most half the lending reserves, and never below the point where (deposits + reserves) * 0.7 still covers outstanding loans |
Forex#
Twenty-eight currencies trade: FOREX_ACTIVE_CURRENCIES () is USD, GBP, JPY, EUR, IEP, CNY, BRL, NGN, SUR, RUB, DDM, FRF, ITL, ESP, SEK, TRL, GRD, ATS, FIM, PLZ, HUF, ROL, BGL, CSK, YUD, PLN, RON and BGN. Nigeria trades even while the country is still coming soon, because its sovereign bonds already settle in NGN and holders would otherwise be trapped; the same logic keeps the 1979 only countries exchangeable in every era. Which of these currencies have a central bank is a separate, preset aware scope ().
Rates are quoted as local currency per one internal unit (₳). Higher rate means a weaker currency, which is why computeStrengthVsReferencePercent in returns (referenceRate / currentRate - 1) * 100 for strength while computeRawRateVsReferencePercent returns the plain rate change. Mixing the two is the classic way to read a devaluation as a rally.
Trading costs ():
| Constant | Value | Applies to |
|---|---|---|
MARKET_MAKER_SPREAD |
0.01 (1%) | Instant market trade |
LIMIT_ORDER_SPREAD |
0.0064 (about 0.64%) | Limit order |
DIRECT_TRADE_SPREAD |
0.0036 (about 0.36%) | Direct player to player trade |
DIRECT_TRADE_EXPIRY_TURNS |
24 | Direct offer expiry |
SECTOR_FX_SPREAD |
0.005 (0.5%) | Cross currency sector flows, half the market maker rate |
FOREX_SPREAD_STRENGTH_MIN / MAX / DEFAULT |
0.5 / 1.5 / 1.0 | Chair dial on the fee when their currency is sold |
FOREX_SPREAD_STRENGTH_COOLDOWN_TURNS |
48 | Wait between dial changes |
FOREX_SIZE_FEE_MAX |
0.2 | Extra fee rate a very large trade approaches |
FOREX_SIZE_FEE_HALF_ANCHOR |
10,000,000,000 (₳) | Trader volume at which the size fee is half its maximum |
FOREX_LIQUIDITY_FEE_MIN / MAX |
0.5 / 1.5 | Fee multiplier in a busy or quiet market |
FOREX_LIQUIDITY_REFERENCE_VOLUME |
100,000,000 (₳) | Gross volume that earns a neutral fee |
FOREX_MAX_TRADE_FEE |
0.3 | Ceiling on a player trade's total fee rate |
A higher spread strength means more reserve income and more capital flow friction but less liquidity and less reserve appeal; lower means the opposite. Each spread fee splits three ways (, ratios in ): SPREAD_FEE_DESTROY_RATIO = 0.25 is destroyed, SPREAD_FEE_FOREX_REVENUE_RATIO = 0.25 goes to the source bank's forexRevenue, and SPREAD_FEE_RESERVE_RATIO = 0.5 accrues to spreadFeeReserveBalances[currency] on the destination bank (the source bank when there is no separate destination).
How the rate moves each turn. runs one pipeline in this order: macro target, drift, volume pressure, cycle pressure, noise, clamp.
Macro target.
computeMacroTargetreturnsbaseRate * max(0.01, m)withm = 1 - (prime - neutralPrime) * 0.02 + (inflation - targetInflation) * 0.015 + absolutePenalty - (gdpGrowth - baselineGdpGrowth) * 0.01 - (tradeGrowth - baselineTradeGrowth) * 0.005using
PRIME_RATE_SENSITIVITY = 0.02,INFLATION_SENSITIVITY = 0.015,GDP_GROWTH_SENSITIVITY = 0.01andTRADE_GROWTH_SENSITIVITY = 0.005. The baselines are an era aware monetary baseline resolved byresolveMonetaryBaselinefrom keyed on the current in-game year (below 1999 only; from 1999 it usesMONETARY_BASELINES), plus the country'sECONOMIC_BASELINESgrowth figures. A 1953 world at 1955 is therefore not judged against late 1970s inflation targets.Absolute inflation term. The inflation sensitivity measures deviation from each currency's OWN target, so a deliberately high baseline (Italy, Turkey, Sweden in the late 1970s profiles) would otherwise sit at par despite crippling inflation and pay a free real carry.
absolutePenalty = max(0, inflation - 6.0) * 0.015(ABSOLUTE_INFLATION_DEPRECIATION_THRESHOLD = 6.0,ABSOLUTE_INFLATION_SENSITIVITY = 0.015). It applies even to currencies with no full economic baseline, which would otherwise be a static peg. Developed markets around 1 to 2% inflation are unaffected.Drift.
rate + (target - rate) * DRIFT_SPEED, withDRIFT_SPEED = 0.05(about 91% of a shock closed after 48 turns). After the Bretton Woods exit the drift is multiplied byBW_FLOATING_DRIFT_MULTIPLIER = 1.5.Volume pressure. Two channels, combined and clamped to
VOLUME_PRESSURE_CAP * VOLUME_DIRECTION_WEIGHT= ±0.01 per turn. Traded flow:0.05 * net / (|net| + 1,000,000,000), times the breadth factor (effectiveTraders / 5, floored at 0.2), weighted byORGANIC_VOLUME_DIRECTION_WEIGHT = 0.05, over aVOLUME_LOOKBACK_TURNS = 24window. Central bank intervention keeps the stronger original channel:clamp(syntheticNet * 0.0001, ±0.05)weighted byVOLUME_DIRECTION_WEIGHT = 0.2. One holder moving a whole fortune reads as breadth 1 and gets only a fifth of the push.Cycle pressure. Each currency rolls a directional regime every
CYCLE_PRESSURE_TURNS = 12, drawn uniformly from five values inCYCLE_PRESSURE_BY_REGIME: ±0.0015 per turn for moderate, ±0.0007 for slight, 0 for neutral. A sustained regime settles only about pressure divided byDRIFT_SPEEDoff the macro target (roughly 3% moderate, 1.4% slight), so fundamentals generally win.Noise. Uniform jitter of
RATE_NOISE_MAX = 0.004(±0.4%) per turn, multiplied by the reserve currency multiplier above.Clamp.
clampRateholds the result toRATE_FLOOR_MULTIPLIER = 0.5andRATE_CEILING_MULTIPLIER = 1.5of the base rate (±50%). Under Bretton Woods the band isBW_PEGGED_BAND = 0.5while pegged and widens towardBW_FLOATING_BAND = 0.8after the float ().
Era anchored starting rates#
Seed rates live in four authored tables in : INITIAL_RATES (2019, the STARTING_YEAR), INITIAL_RATES_1991, INITIAL_RATES_1979 and INITIAL_RATES_1953. The 1953 table is Bretton Woods par: GBP 0.357 (the $2.80 par), JPY 360.0 (the Dodge Line peg fixed 1949 to 1971). The 1991 table uses IMF IFS annual averages: GBP 0.57, JPY 134.5, CNY 5.32, NGN 9.9, and a DEM to EUR equivalent of 0.85 derived through the fixed 1.95583 DEM per EUR parity. Brazil is deliberately excluded from 1991 (cruzeiro hyperinflation makes a parity meaningless) and keeps the 2019 BRL 5.0 as a divide by zero guard. The 2019 table has USD 1.0, GBP 0.75, JPY 106.0, EUR 0.92, BRL 5.0, CNY 7.2, NGN 1550.
getInitialRatesForYear(year) covers everything between. It returns the authored table unchanged at an anchor year, so 1953, 1979, 1991 and 2019 worlds are byte identical, clamps below the first anchor and above the last rather than extrapolating, and otherwise interpolates GEOMETRICALLY between the two surrounding anchors (exp(log a + (log b - log a) * t)). Exchange rates compound: straight line interpolation put Nigeria at roughly 450 naira in 1999 against a real rate near 97, while the geometric mean gives about 42. A country present in only one anchor keeps that anchor's rate, since a missing entry means "not authored", not "no currency".
Savings and the real rate#
Savings pay half the REAL prime rate. savingsApyPercent in src/lib/currency/savingsInterest.ts:
apy = max(SAVINGS_REAL_RATE_FLOOR_PERCENT, prime - inflation) / 2 + depositBonus
with SAVINGS_REAL_RATE_FLOOR_PERCENT = 0.5, so the floor APY is 0.25% before the bonus. Paying the real rate rather than the nominal prime is what closes the carry trade: a currency with a high nominal prime also has high inflation, so its real spread, and therefore its APY, ends up near everyone else's. The floor is uniform across every currency, so it confers no cross currency advantage and cannot be arbitraged.
depositBonus is the central bank pricing adjustment in : CENTRAL_BANK_DEPOSIT_BONUS_PERCENT_POINTS = 0.25 on central-bank-held savings, phased in linearly over CENTRAL_BANK_PRICING_PHASE_IN_TURNS = 8 turns from gameConfig.centralBankPricingPhaseIn.startedTurn. It is 0 until a start turn is stamped.
Accrual is simple, per turn: balance * (apy / 100) / TURNS_PER_YEAR, rounded to whole yen for JPY and two decimals otherwise (roundSavingsAmount). A prime rate at or below 0 pays nothing. Interest accrues every turn into currencyBalances.pendingSavingsInterest but is credited to the balance once every SAVINGS_CREDIT_INTERVAL_TURNS = TURNS_PER_YEAR / 4 = 12 turns (a game quarter, when turn % 12 == 0); turnsUntilSavingsCredit drives the countdown players see.
One more guard: SAVINGS_POOL_SHARE_CAP = 0.25. Interest accrues only on the lesser of the account's balance and 25% of the whole national pool for that currency (interestEligibleBalance), so a single actor cannot become nearly all of a currency's savings and farm the pool's interest. It binds only on accounts above that share. The pool total the turn uses is centralBanks.nationalSavingsBalance, written during the accrual pass of the previous turn, so it is one turn stale; when it is zero the full balance is eligible. Every credit, deposit and withdrawal writes a savingsLedger row via with the balance after, so the player's statement is a real ledger, not a recomputation.
Lines of credit#
A LOC is priced off the same prime rate the central bank sets, plus a spread that depends on the borrower, plus the central bank adjustment. spreadPercentPointsFromComposite in maps a 0 to 100 credit composite to 5 - (composite / 100) * 6: +5 points over prime at the bottom, -1 point under prime at the top. The annual rate is prime + spread + spreadHike, where CENTRAL_BANK_LOC_SPREAD_HIKE_PERCENT_POINTS = 2 is phased in over the same 8 turns as the deposit bonus ().
The composite is built in three steps (computeLocBorrowerComposite):
- Base blend.
incomeScoreFromPerTurnCurrencyannualizes the rolling average of personal inflow over the last 48 turns (salary, dividends and coupons after income tax, not campaign funds) through100 * (1 - exp(-annual / 2,500,000)).netWorthScoreFromInternaldoes the same on internal unit wealth with a 4,000,000 scale.userCreditCompositeis0.75 * corporate + 0.25 * incomefor a CEO with a company rating, otherwise0.5 * income + 0.5 * netWorth. - Leverage penalty.
applyDebtLeveragePenaltysubtractsmin(30, debtToAssets * 38). - Prime stress.
applyPrimeEnvironmentToCompositesubtractsmin(22, max(0, prime - 2.5) * 5) * (1 - 0.65 * netWorthScore / 100), withPRIME_STRESS_BASELINE_PERCENT = 2.5, so wealth shields up to 65% of the stress.
Interest is simple per turn on principal plus arrears: computeLocInterestForTurn charges (obligation * (prime + spread) / 100) / TURNS_PER_YEAR and the caller adds it to arrears. Repayment is automatic at LOC_PER_TURN_PAYMENT_RATE = 0.01625 / 4 (0.40625% of the obligation per turn). The derivation is a real world rule of thumb: roughly 1.625% of principal per month on a modest fixed rate loan, and one game month is four turns. Over about 23 game years a zero interest loan is about 99% repaid. Payments allocate to arrears first, then principal, in a stable currency order.
A borrower can flip a currency's account to interest only mode, which pays arrears alone and leaves principal flat, at the cost of LOC_IO_SURCHARGE_PERCENT_POINTS = 2.0 extra on the annual rate for that currency. Mode flips are gated by LOC_PAYMENT_MODE_COOLDOWN_TURNS = 24 (one real day). A payment that cannot be covered sets drawFrozen and redirects recurring income to the loan ().
Three caps bound borrowing, in :
| Cap | Rule |
|---|---|
| System wide | One currency exchange may lend at most LOC_DEPOSIT_FRACTION = 0.7 of its savings deposits plus reserves; availableForExchangeInternal subtracts every borrower's outstanding principal and arrears |
| Debt to income | LOC_DTI_MAX_FRACTION = 0.7 caps the scheduled per turn payment at 70% of per turn income, so the maximum principal is (0.7 * incomePerTurn) / LOC_PER_TURN_PAYMENT_RATE; income of zero means a limit of zero |
| Equity | LOC_NET_WORTH_LIMIT_MULTIPLIER = 1 caps total exposure at current economic equity; net worth already excludes LOC debt, so debt funded bond or stock purchases cannot recursively inflate the ceiling |
Money supply aggregates#
M1, M2, growth annualization and open market operations are on Money Supply and QE. The links back to this page are that the prime rate prices the sovereign bonds QE trades, and that chair authority decides who may order an operation.
Data#
| Collection | Fields read or written | Shown to players |
|---|---|---|
centralBanks |
primeRate, rateHistory (max 96), interestRateHistory, lastRateChangeTurn, rateChangesThisTerm, chairCharacterId, chairMode, chairAlignment, chairInfamy, chairControlsLocked, chairTermExpiresAtTurn, nominations, lobbyingPool, chairSelectionPending, vacancyAwaitingAutomaticSelection, fomcBoard, activeFomcMeeting, fomcMeetingHistory (max 24), lastFomcMeetingTurn, reserveBalance, forexRevenue, spreadFeeReserveBalances, nationalSavingsBalance, inflationHistory |
Rate, history, board, scrutiny, nominations, lobbying and reserves on the Central Bank page; chairControlsLocked is an admin switch |
fomcNominations |
bankId, seatId, makeChair, nomineeCharacterId or nomineeNppId, occupantType, alignment, votes, status |
Senate confirmation panel |
exchangeRates |
rate, rateHistory, currencyCode, monetaryRegime, fxRegime, capitalControls, interventionPolicy |
Rates, charts and regime panel |
characters |
currencyBalances.{personal, savings, savingsHolder, pendingSavingsInterest}, lineOfCredit.{balances, arrears, drawFrozen, paymentMode, paymentModeChangedAt, fundingSource} |
Wallet, savings tab and loan screen |
savingsLedger |
characterId, countryId, currencyCode, type, amount, balanceAfter, turn |
Savings statement |
savingsAccounts |
accruedInterest, version |
Accrued (uncredited) interest |
federalBudget |
economicFactors.inflationRate, economicFactors.gdpGrowth, economicFactors.tradeGrowth (read as macro inputs) |
Budget page |
gameConfig / gameState |
Flags in the next section | No |
Configuration#
Defaults for new worlds are set in (DEFAULT_GAME_STATE_FLAGS and FRESH_WORLD_GAME_CONFIG_FLAGS).
| Setting | Default | Effect |
|---|---|---|
gameState.forexEnabled |
true | Off: forexTurn is skipped with a recorded reason, so rates do not move |
gameState.eraSystemEnabled |
true | Selects era monetary baselines and cost forms |
gameState.preset / startingYear |
per world | Selects the initial rate table; keys the BoE independence default |
gameConfig.lineOfCreditEnabled |
true | Gates the LOC feature |
gameConfig.commandEconomyEnabled |
era derived (on for 1953 and 1979 command regimes) | Command economies set no independent rate |
gameConfig.privateBankingEnabled |
true | Liquidity injections reach chartered banks; bank-held savings |
gameConfig.moneySupplyEnabled |
true | Money supply snapshots and operations |
gameConfig.centralBankPricingPhaseIn.startedTurn |
stamped by the engine on the first economy turn | Starts the 8 turn phase-in of the LOC spread hike and the deposit bonus |
centralBanks.chairControlsLocked |
unset | Admin lock on chair actions |
centralBanks.governmentControlled |
unset (era derived) | Explicit override from legislation |
exchangeRates.fxRegime, capitalControls, monetaryRegime |
float, open, pegged (Bretton Woods era) | Impossible trinity gate; Bretton Woods band and drift |
Country config centralBank.sharedBankId |
per country | Selects the chair bank; shared banks cannot legislate independence |
| NPP autonomy level () | per world | Any level other than off seats a caretaker chair when no player can be drawn (never for the US) |
Timing#
One turn, in order (, ):
flowchart TD
S[savingsInterestTurn] --> B[bondTurn] --> L[lineOfCreditTurn] --> F[fiscalYear on turn 40]
F --> SE[stateEffectsAndNationalAggregation]
SE --> I[inflationRecalc] --> BW[brettonWoodsTurn] --> X[forexTurn] --> C[centralBankChairTurn] --> M[fomcMeetings] --> N[nppMonetaryOperations]
N --> R[chair removal and selection]
R --> MS[moneySupplySnapshot closes the turn]
savingsInterestTurnaccrues savings interest at the prime and inflation left by the previous turn. The quarterly credit lands whenturn % 12 == 0.lineOfCreditTurncharges LOC interest at prime plus spread and takes the automatic payment. It needs the same turn'scorporationTurncurrency income when forex is enabled. It runs afterbondTurn.- Inside
stateEffectsAndNationalAggregation:inflationRecalc,brettonWoodsTurn, thenforexTurn(rates, limit orders, spread revenue; skipped when forex is off), thencentralBankChairTurn,fomcMeetings(opens and resolves meetings every 8 turns),nppMonetaryOperations,centralBankChairExecutiveRemoval,centralBankChairSelection. moneySupplySnapshotcloses the turn.
A prime rate set on turn T first affects forex drift on turn T+1 and savings and LOC interest on turn T+1. Chair and government rate changes are written immediately by updatePrimeRate and are subject to the 6 turn cooldown; committee decisions land when fomcMeetings resolves a meeting. The sub-hour :30 tick can apply half of the inflation and forex step ahead of the turn, and the turn applies the remainder (, computeFractionalRateUpdate).
Worked trace#
A US world in 2025. The committee carries a hike from 4.00% to 4.75%. Inflation is 3.0% against a 2.0% target. A saver holds 1,000,000 USD in savings in a pool of 10,000,000. A borrower with composite 50 owes 120,000 USD of principal and no arrears. The central bank pricing phase-in has not started (bonus and spread hike are 0).
- Governance. Seven governors are seated, so
majorityThreshold(7) = 4. Four vote hike, three vote hold or cut, so the motion passes. The proposed delta 0.75 is withinmaxHikeDeltaFor(3.0 - 2.0 = 1.0)= 0.75. New ratesnapToPrimeRateGrid(4.00 + 0.75) = 4.75,rateChangesThisTermrises by 1,lastRateChangeTurnis set. - Savings. Before:
max(0.5, 4.00 - 3.0) / 2 = 0.50%. After:(4.75 - 3.0) / 2 = 0.875%. Eligible balancemin(1,000,000, 0.25 * 10,000,000 = 2,500,000) = 1,000,000. Per turn accrual before1,000,000 * 0.005 / 48 = 104.17, after1,000,000 * 0.00875 / 48 = 182.29. Twelve turns at the new rate credit12 * 182.29 = 2,187.48. - Line of credit. Spread
5 - 0.5 * 6 = 2.0. Annual rate before4.00 + 2.0 = 6.00%, after6.75%. Interest per turn before120,000 * 0.06 / 48 = 150.00, after120,000 * 0.0675 / 48 = 168.75, added to arrears. Payment(120,000 + 168.75) * 0.0040625is about 488.19, applied to arrears first (168.75), then 319.44 to principal, leaving about 119,680.56. - Forex. Using the US baselines (target inflation 2, neutral prime 3, baseline GDP growth 2.5, baseline trade growth 0) and growth at baseline:
m = 1 - (4.75 - 3) * 0.02 + (3.0 - 2.0) * 0.015 = 0.98(it was0.995at 4.00%). With base rate 1.000, the target is 0.980. From a current rate of 1.000 one drift step gives1.000 + (0.980 - 1.000) * 0.05 = 0.999, with no volume pressure, a neutral cycle regime and zero noise. The dollar is 0.1% stronger after one turn and keeps closing 5% of the gap per turn. - Trade fee. A 10,000 market maker trade at spread strength 1.0 pays
10,000 * 0.01 = 100. Split: 25 destroyed, 25 to the source bank'sforexRevenue, 50 tospreadFeeReserveBalanceson the destination bank.
Edge cases and limits#
- Rates snap to 0.25 points; the floor is 0 and the ceiling 25; a request equal to the current rate is refused.
- A government controlled bank (pre-1997 Bank of England by default) has no committee and only the head of government or finance seat can move the rate. Each such change adds 12 to
chairInfamy. - A shared bank (ECB, sterlingized Scotland and Wales) cannot legislate independence.
- Only the US runs a committee. A tied or partial vote holds: a motion needs a strict majority of seated governors, and seated governors without a ballot count against it. Vacant seats do not count, so five seated need three votes.
- A board with no seated governors is dead: meetings pause and the chair (or the autonomous setter) sets the rate directly.
- Pegged or banded currencies with an open capital account cannot change the rate; floating with capital controls is allowed but buys nothing.
- Savings real rate floor of 0.5 gives a 0.25% APY floor even in deflation or negative real rates, but a prime rate at or below 0 pays no interest.
- A single actor earns interest only on up to 25% of the national savings pool in a currency.
- LOC: no verified income means a limit of zero; scheduled payments cannot exceed 70% of per turn income; total exposure cannot exceed net worth.
- Forex off (
gameState.forexEnabledfalse):forexTurnis skipped, so exchange rates do not move. - Forex rate is clamped between 0.5x and 1.5x of the base (seeded era) rate; the Bretton Woods float widens the band to 0.8.
- A rate with no usable value in a conversion returns 0 rather than NaN (
convertCurrencyAmount). - Chair nominations cap at 3 per bank and cost the head of government 1 action point each. Only player characters can be nominated, drawn or seated through the draw.
- A caretaker chair holds the seat for its full 192-turn term even when players are nominated; the draw waits for the term to end.
- Every chair and FOMC term is 192 turns from acceptance or confirmation. Country office tables list
termYears5 or 6 for some governors, but no chair code reads it. - Money supply growth readings are
nulluntil 12 turns of history exist (see Money Supply and QE).
Invariants#
| Invariant | Enforced by |
|---|---|
| The stored prime rate is on the 0.25 grid and between 0 and 25 | handleSetRate and resolveMeetingInto in , tested in machine.test.ts |
| A non-admin rate change obeys the delta, cooldown and per-term limits | Same machine; |
rateHistory never exceeds 96 entries |
governanceShell.ts slices on append; not separately tested |
| A forex rate stays inside the clamp band around the base rate | clampRate, tested in |
| A spread fee splits 25 / 25 / 50 and the three shares sum to the fee | Ratios in ; |
| Outstanding LOC never exceeds 70% of deposits plus reserves at the time of a draw | availableForExchangeInternal and the reserve transfer cap; |
| Savings interest is not paid twice | The accrual update filters on the balance and holder it read, so a concurrent change misses instead of paying on a stale balance; no dedicated test for savingsInterestTurn |
Failure and recovery#
- A stuck FOMC meeting. A meeting that never reaches a majority is forced to resolve at the turn deadline (
FOMC_VOTE_WINDOW_TURNS = 24), with non-voters abstaining. If a rate move is blocked at resolution (cooldown, term cap, regime), the meeting recordsexecutionOutcome: "blocked"with a reason and the rate stays. - An empty board. If every seat is vacant the committee cannot carry motions. The bank falls back to direct chair or autonomous setting. Governor seats refill only when a nomination is confirmed; the chair seat can also be filled by an accepted chair draw.
- An unanswered chair pick. A pending pick that is not accepted within 24 turns lapses and is redrawn with the nominee excluded for the cycle, so a silent nominee cannot freeze the seat. With no other candidate the seat goes vacant or to a caretaker (not in the US).
- A wrong or stale rate document. Exchange rates and inflation read through finite checks, so a non-finite input falls back to a sane default instead of poisoning the rate history. A bad stored rate is repaired with a data heal and the next turn recomputes from the base rate.
- A mis-seeded bank.
seedFomcBoardsis idempotent and skips banks that already have a board, so a rerun is safe after a failed seed. - Interrupted savings or loan writes. Accrual and payment writes are filtered on the state they read; a concurrent change makes the write miss and the next turn catches up. Pending interest is kept in
pendingSavingsInterest, so an interrupted quarterly credit is paid on the next credit turn. - Forex skipped. With forex off the turn records a skipped phase and rates freeze; turning it back on resumes from the last stored rate.
Connections#
Driven by:
- National Budget: the inflation rate and GDP growth feed the Taylor rule (), the savings real rate and the forex macro target ().
- Elections and Cabinet: who sits as head of government, finance seat and Senate confirmer decides who may set the rate or fill an FOMC seat ().
- Tariffs and trade: trade growth enters the forex target.
Affects:
- National Budget: the prime rate sets the
monetaryinflation term () and the coupon on new sovereign bonds, and so the interest cost on debt. - Sovereign Bonds: bond prices derive from the prime rate; QE and QT are covered in Money Supply and QE.
- Currency Exchange: the prime rate sets drift, and spread fees fill the reserve stack that ranks reserve currencies.
- Player wealth: savings APY and LOC cost change personal cash flow every turn.
Tests#
| Area | Files (under src/lib/) |
|---|---|
| Governance machine, execution policy, jurisdiction | monetaryGovernance/rules/machine.test.ts, monetaryGovernance/executionPolicy.test.ts, monetaryGovernance/governanceShell.test.ts, monetaryGovernance/jurisdiction.test.ts |
| Committee, alignment, nominations, seeding | centralBank/fomc.test.ts, centralBank/chairAlignment.test.ts, centralBank/seedFomcBoard.test.ts, turn/fomcMeetingTurn.test.ts |
| Chair selection, caretaker, lapse | turn/centralBankChairSelection.test.ts (nomination window, caretaker mid-term, US left vacant, autonomy off left vacant) |
| Independence and limits | centralBank/governance.test.ts, centralBank/independence.test.ts, centralBank/rateLimits.test.ts, centralBank/credibility.test.ts |
| Corridor, reserves | centralBank/rateCorridor.test.ts, centralBank/reservePortfolio.test.ts, centralBank/reserveCurrencyRanking.test.ts, centralBank/reservePoolTransfer.test.ts, centralBank/reservePoolTransferCommands.test.ts |
| Forex | currency/rateCalculation.test.ts, currency/rateCalculation.fractional.test.ts, currency/spreadFees.test.ts, currency/tradeFees.test.ts, turn/forexTurn.test.ts, constants/currencies.test.ts, constants/currencies.eraRate.test.ts |
| Savings | currency/savingsInterest.test.ts, turn/nppSavingsInterest.test.ts |
| Lines of credit | lineOfCredit/creditMath.test.ts, lineOfCredit/locMath.test.ts, lineOfCredit/locMath.paymentMode.test.ts, lineOfCredit/buildSnapshot.test.ts, lineOfCredit/garnishment.test.ts, turn/lineOfCreditTurn.test.ts |
| Central bank pricing | monetaryPolicy/centralBankPricing.test.ts, monetaryPolicy/centralBankPricingRollout.test.ts |
Gaps: there is no test file for updatePrimeRate.ts itself (the machine under it is covered), none for turn/savingsInterestTurn.ts, and none for turn/forexLimitOrders.ts.
Known issues and history#
- The Central Banks and Savings wiki pages say savings and loans work for "the 18 main" tradable currencies. The code has 28 entries in
FOREX_ACTIVE_CURRENCIES, including the Eastern bloc currencies and their successors. The wiki count is stale. - The committee exists for the US only (
FOMC_COMMITTEE_COUNTRY_IDS). The Central Banks wiki table agrees. LOC_DTI_MAX_FRACTIONandLOC_NET_WORTH_LIMIT_MULTIPLIERare file-local constants inlocMath.ts, as isNPP_CHAIR_HIGH_INFLATION_GAP, so other code cannot import them.- The savings pool-share cap reads a pool total that is one turn old.
- Double scrutiny haircut on a chair handover.
CHAIR_CHANGE_SCRUTINY_RETAINED = 0.75is applied when a pick is proposed and again when it is accepted, so a normal handover keeps 56.25%, not the single "retained fraction" the code comments describe, and every decline or lapse redraw multiplies again. A dismissal adds 18 first, then the replacement draw applies the same multipliers. A seat left vacant with no candidate (the US, or autonomy off) keepsvacancyAwaitingAutomaticSelectionset, so the draw reruns each turn andpersistVacancymultiplies by 0.75 every turn until someone is nominated. Looks unintended; owner decision, not changed. - A caretaker blocks a nominated player for up to 192 turns. The nomination window is always open on an NPP-chaired bank (the
isNominationWindowOpencomment says so on purpose), but a nomination does not set the vacancy flag, so no draw runs until the caretaker's term expires. If the intent is "always open", a nomination on an NPP-chaired bank should probably flag the vacancy. - Office tables list a different governor term. Country office tables give chair
termYearsof 5 or 6 for JP, CN, RU and BLR (for example ), but every chair term is 192 turns (4 game years) and no chair code readstermYears. - FOMC seats and executive office. The FOMC nominate route does not check a player nominee for executive office, and the executive-removal sweep clears only the chair mirror and chair seat, not other board seats, so a governor who takes executive office keeps voting.
- 2026-10-29 chair and committee corrections to this page: legislation seeds a board only for the US, not for an independent Bank of England; expired seats are vacated, not replaced with a flipped temperament; the executive draw is the main chair path and the second route to the Fed chair seat, not a legacy path; added Chair selection.
- 2026-10-29 review corrections to this page: committee majority counts seated governors (not the full board);
rateHistorykeeps 96 entries (not 50); direct rate sets are blocked while a committee is seated; the pool transfer movesforexRevenueandreserveBalance, notspreadFeeReserveBalances; a forex fee is split 25 / 25 / 50, not credited whole to the reserve; traded volume uses the organic channel rather than the intervention channel; the cap on the pool is the storednationalSavingsBalance.
Last checked: 2026-10-29, version 1.18.0
A House Divided
Corporate Warfare
Grand Century
Margin of Victory
Desktop client