A House Divided A House DividedDocumentation
Changelog
Game Design/Economy & Finance

IMF corporate bailout (admin rescue)

Last updated 2026-08-20
Source files

Status: shipped. This is the corporate-side IMF rescue facility, live in code (src/lib/imf/). It is a separate mechanism from the sovereign IMF facility described below, the two use different capture/cap numbers and different eligibility (corporations vs national governments); do not conflate them.

Purpose#

Give admins a structured bailout tool for distressed corporations: flag a corp as under IMF restructuring; reduce bond-holder claims (haircut) and notify holders; consolidate remaining obligation into an amortizing IMF facility (principal + interest) with payments defaulting to a 35% capture of per-turn income, capped at 45% (IMF_BAILOUT_DEFAULT_INCOME_CAPTURE_FRACTION / IMF_BAILOUT_INCOME_FRACTION_CAP, ); remit collections to the IMF corporation in USD (with forex from the rescued corp’s home currency / ₳ as needed); dilute existing shareholders by issuing new shares to the IMF; bar dividends and CEO compensation while active; block bond-default refinance while active; apply a −15% share price penalty (IMF_BAILOUT_SHARE_PRICE_MULTIPLIER = 0.85, already wired into computeSharePrices); show admin-only stake metrics in ; and allow admin forced liquidation if the CEO fails obligations.

Sovereign IMF facility (separate system)#

Governments have their own IMF facility for sovereign default, implemented in src/lib/sovereignDefault/ (imfSovereignFacility.ts, constants.ts). It uses different numbers: income capture defaults to 20% (IMF_SOVEREIGN_INCOME_CAPTURE_DEFAULT), floored at 10% and capped at 30% (IMF_SOVEREIGN_INCOME_CAPTURE_MIN / IMF_SOVEREIGN_INCOME_CAPTURE_CAP). It is not covered further in this doc.

Private banking has its own distress-lending mechanism, interbank loans and dead-bank handling in and . It is unrelated to the IMF corporate facility described here and is not covered further in this doc.

Currency#


Lore / user identity#


Data model#

1. IMF institution corporation#

2. Bailout state on the rescued corporation#

Add to Corporation (names illustrative):

Field Type Meaning
imfBailoutActive boolean Bailout / restructuring in effect.
imfBailoutImfCorporationId ObjectId Which IMF corp holds (or will hold) the stake.
imfBailoutTargetOwnershipPercent number Target fully diluted ownership of the IMF (0-100), e.g. 40.
imfBailoutStartedAt Date or turn Audit / display.

IMF facility (amortization), illustrative fields on the rescued corp:

Field Type Meaning
imfFacilityPrincipalOutstanding number (₳) Remaining principal owed to IMF after haircut / consolidation.
imfFacilityAnnualRate number Annual interest rate on outstanding principal (design-tunable).
imfFacility… turns / dates Term or maturity, enough to compute scheduled P+I each turn.

Invariant: When imfBailoutActive is true, imfBailoutImfCorporationId must reference the seeded IMF corp (validate on write).

3. Bond-holder haircut + notification#

4. Share issuance to the IMF#

5. IMF facility payments (P/I), income cap, USD remittance#

6. Admin forced liquidation#


Behavioral rules#

2. Share price: −15% during bailout#

2b. Dividends and CEO compensation: barred during bailout#

3. Debt valuation for admin display#

4. IMF selling shares#


Admin panel#

API#

UI (CorporationsAdminPanel and/or corp detail admin)#

Config#


Seeds / ops checklist#

  1. Create IMF Corporation + assign Sherrod Brown as CEO.
  2. Store IMF _id in config / GameState as required by code.
  3. Document how to fix a broken assignment (admin CEO route already exists: ).

Testing#

Area Tests
Issuance math Unit: x = p*O/(1-p), edge cases p=0, p→1.
Haircut Bond units scale; mail sent (mock playerMail).
Amortization Cap 45% income; principal decreases; IMF USD credit.
Refinance blocked Integration or route test: bailout on → POST refinance 400.
GET bond-default canRefinance false when bailout active.
Share price Corp turn: bailout on → price = 0.85 × baseline.
Dividends / CEO pay Routes 400 when bailout active; turn snapshot shows $0 payout.
Admin valuation Unit: facility principal, IMF %, equity vs net-of-debt display.
Force liquidate Admin-only; CEO path unchanged.

Risks / follow-ups#


File map (expected touch list)#

Area Files (representative)
Types
Turn / price / facility sectorCalculations.ts, new amortization helper or phase in src/lib/turn/ (order per core-systems)
Mail
Bond default API bond-default/route.ts, refinance/route.ts, extract dissolve to shared lib + force-liquidate
Admin API admin/corporations/route.ts, imf-bailout, force-liquidate
Admin UI
Seeds scripts/ (new or existing seed)
Tests Co-located *.test.ts / integration tests

Out of scope (this plan)#