[#75] Configurable reserve requirement: shore by the bond market or go insolvent #76
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Winnie/bankwars!76
Loading…
Reference in a new issue
No description provided.
Delete branch "75-reserve"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Reserve requirement, shored by the bond market (issue #75)
Your three questions, answered first:
What was the existing mechanism? The finance phase had a shoring rule: when cash could not cover deposit interest + operating expense, the bank force-borrowed exactly the shortfall from the bond market before paying. What it did NOT do: anything about the deposit PRINCIPAL. A bank could be insolvent on equity (liabilities > assets) with cash in hand and no debt, while cheap bonds sat on the market — the equity test killed it without ever giving the bond market a chance to shore the position. That is the exact case you saw.
Was it fundamentally a 0% reserve? Yes. Nothing required cash to be held against deposits. The only cash gate was "can you pay this turn's interest," which is a flow test, not a reserve.
Can we impose a reserve requirement in config? Now yes:
reserve_ratio, default0.10, settable in config JSON and the wizard. It means 10% of deposits must be held in CASH, enforced BEFORE PnL and insolvency resolve.The mechanism (
9450a9f):reserve = reserve_ratio × depositsis computed first.reserve_ratio: 0restores the old behavior exactly.(config 'reserve-ratio).Verification: three new regression tests (shored-by-market survives with the bond debt on its books; unshorable dies with cash in hand, proving the reserve trigger; ratio 0 is a strict no-op). Full
go test .andgo vet ./...green. Spectate smoke: 0[aierrors, 0 divergences, reserve trigger observed firing. A 20-game direction bench across all 13 presets completes with normal bankruptcy dynamics and no structural breakage — win distribution shifts a bit under the new constraint, which is expected: the four brains were tuned pre-reserve and may deserve a retuning pass later.@Winnie key feature here though is that players have an opportunity to shore their position prior to PnL, and during the bond taking phase, and for a human player this should be a direct menu item to tell, if any, what debt amount they need to take to stay in. I hope that is made very clear.
Understood - the shore-up number will be a direct, unmissable menu item on the take-bonds screen, computed with the exact same math the finance phase enforces: the minimum bond debt to take so the position survives PnL and insolvency. Working it in now, with a quick-take option so one keystroke takes exactly that amount. Commenting again with the transcript once it's verified.
Done — the shore-up opportunity is now a direct menu item on the take-bonds screen, before you choose anything, computed with the exact same math the finance phase enforces. Transcript from a scripted game (10% reserve, cash drained to 0 by my own bond commitments):
stakes exactly the shore-up amount — one keystroke, same preview/confirm flow as any take. In this case the cheapest money was my own standing offer, so the preview showed "retires 6 of your own units, 6000 cash back — no new debt" and the engine did exactly that.SHORE UP: none needed — 5,200 cash covers the 10% reserve (5,000) and bills (800).Both branches verified in the smoke run above, tests/vet green, spectate clean (the line never leaks into headless games).