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

Subsidies

Last updated 2026-10-29
Player wikiSubsidies
Source files

Summary#

Subsidies are government financial support programs enacted via legislation that provide profit margin bonuses to qualifying corporations. They are the domestic counterpart to tariffs. Each active subsidy that a sector qualifies for adds 7.5 percentage points to its profit margin and costs the granting government an annualized budget line of 10.5% of the qualifying revenue. They are created and ended only by industry bills.

Player guide: Subsidies

Entry point:

Rules#

Constants#

Constant Value Source
SUBSIDY_MARGIN_BONUS 7.5 percentage points per qualifying active subsidy
SUBSIDY_DEADWEIGHT_FACTOR 1.4 (fiscal inefficiency premium, file-local)
SUBSIDY_COST_MULTIPLIER (7.5 / 100) x 1.4 = 0.105 of annual qualifying revenue
TURNS_PER_YEAR 48 (annualizes one turn of revenue)
MARGIN_SOFT_CAP_KNEE 80
MARGIN_HARD_CEILING 100
SECTOR_SUBSIDIES_SPENDING_KEY "sectorSubsidies" (budget category key)
Sentiment pulse on a sector subsidy starting or ending +0.08 to +0.15 (default 0.10) on start, the same size negative on end, decay 0.85 per 15-minute interval (fireSubsidyCreatedPulse, fireSubsidyEndedPulse)
Sentiment cap plus or minus 0.25 (SENTIMENT_CAP)

Subsidy structure#

interface Subsidy {
  _id: ObjectId;
  countryId: CountryId; // Country (national) or state's country
  scope: "national" | "state"; // Scope level
  stateId?: string; // For state subsidies
  scopeType: string; // "economy_wide" | "sector"
  targetSectorType?: string; // For sector scope
  targetStrategyId?: string; // Optional: require specific operating strategy
  domesticOnly: boolean; // Only corps HQ'd in territory qualify
  active: boolean; // Active status (false = ended)
  sourceBillId: ObjectId; // Enacting legislation
  createdAt: Date;
  updatedAt: Date;
}

Qualification Rules#

A corporation sector qualifies for a subsidy if it passes ALL filters:

// corpQualifiesForSubsidy():21-60

// 1. Territory filter
if (subsidy.scope === "state") {
  if (sectorStateId !== subsidy.stateId) return false; // State: sector must be IN state
} else {
  if (sectorCountryId !== subsidy.countryId) return false; // National: sector must be IN country
}

// 2. Sector type filter
if (subsidy.scopeType === "sector" && subsidy.targetSectorType !== sectorType) return false;

// 3. Strategy filter (optional)
if (subsidy.targetStrategyId != null) {
  const effectiveStrategy = sectorStrategyId ?? "standard";
  if (effectiveStrategy !== subsidy.targetStrategyId) return false;
}

// 4. Domestic-only filter
if (subsidy.domesticOnly) {
  if (subsidy.scope === "state") {
    if (corpHqState !== subsidy.stateId) return false; // HQ must be in state
  } else {
    if (corpCountryId !== subsidy.countryId) return false; // HQ must be in country
  }
}

return true;

The sector type match uses sectorPolicyTargetMatches() in : a target of manufacturing also matches manufacturing_vehicles, and media also matches media_entertainment. Any other target must equal the sector type exactly.

Scope Types#

Scope Description Qualifying Sectors
economy_wide Blanket subsidy to all sectors All sectors in territory
sector Targeted subsidy to specific sector e.g., only healthcare sectors

Domestic-Only Flag#

When domesticOnly: true:

When domesticOnly: false (default):

Margin Modifier#

Each qualifying active subsidy provides +7.5pp profit margin:

// getSubsidyMarginModifier():66-93
const SUBSIDY_MARGIN_BONUS = 7.5;

let total = 0;
for (const s of subsidies) {
  if (!s.active) continue;
  if (
    corpQualifiesForSubsidy(
      s,
      corpHqState,
      sectorType,
      sectorStateId,
      sectorStrategyId,
      sectorCountryId,
      corpCountryId
    )
  ) {
    total += SUBSIDY_MARGIN_BONUS;
  }
}
return total;

Stacking Examples#

Subsidies Total Bonus
1 federal (economy_wide) +7.5pp
1 state (sector: healthcare) +7.5pp
1 federal + 1 state (same sector) +15pp
2 federal (economy_wide + sector) +15pp
2 federal (same scope) +7.5pp (second overwrites first)

Note: Multiple subsidies of the same scope/type do NOT stack - the second overwrites the first via upsert. Different scopes (economy_wide + sector) or different levels (federal + state) DO stack.

Enactment#

Subsidies are enacted via legislation:

// applySubsidyProvision():99-129
const filter = {
  countryId,
  scope,
  stateId: stateId ?? null,
  scopeType: provision.scopeType,
  targetSectorType: provision.targetSectorType ?? null,
  targetStrategyId: provision.targetStrategyId ?? null,
};

await db.collection<Subsidy>("subsidies").updateOne(
  filter,
  {
    $set: { domesticOnly: provision.domesticOnly, active: true, sourceBillId, updatedAt: now },
    $setOnInsert: { createdAt: now },
  },
  { upsert: true }
);

Ending Subsidies#

Subsidies can be terminated via end_subsidy provisions:

// applyEndSubsidyProvision():135-159
await db.collection<Subsidy>("subsidies").updateMany(
  {
    countryId,
    scope,
    stateId: stateId ?? null,
    scopeType: provision.scopeType,
    targetSectorType: provision.targetSectorType ?? null,
    targetStrategyId: provision.targetStrategyId ?? null,
    active: true,
  },
  { $set: { active: false, updatedAt: new Date() } }
);

Audit trail: Subsidies are marked active: false rather than deleted, preserving historical records.

Composite Key#

Subsidies use a six-field upsert key to prevent duplicates:

{
  (countryId, scope, stateId, scopeType, targetSectorType, targetStrategyId);
}

Re-enacting the same provision updates the existing subsidy rather than creating a duplicate.

Budget cost#

Subsidies are not free to the state. Each active subsidy carries an annualized cost in the owning government's budget (). The cost is the margin points delivered (7.5pp as a fraction of revenue) times a deadweight factor, SUBSIDY_DEADWEIGHT_FACTOR = 1.4, so SUBSIDY_COST_MULTIPLIER = 0.075 × 1.4 = 0.105 of annual qualifying revenue. Cost is measured on the same revenue the margin bonus is earned on: realized revenue where plants production applies, not nameplate capacity. Sector revenue is normalized to the anchor currency, summed, and converted to the subsidizing country's currency for the budget.

Integration with corporation turn processing#

Subsidy margin modifiers are applied during sector processing:

// src/lib/turn/corporation/sectorTurn/marginStack.ts
const subsidyMod = getSubsidyMarginModifier(
  lookups.activeSubsidies,
  corp.headquartersState,
  sector.sectorType,
  sector.stateId,
  sector.strategyId,
  sectorCountryId,
  corpCountry
);

const totalMarginMod = /* ... + subsidyMod + ... */;
const effectiveMargin = softCapEffectiveMargin(
  sector.profitMargin + totalMarginMod + nationalizedMarginPenalty
);

The margin is not hard-capped at 100. softCapEffectiveMargin() in leaves values up to MARGIN_SOFT_CAP_KNEE = 80 unchanged and compresses anything above with 80 + 20 * tanh((m - 80) / 20), so the result approaches MARGIN_HARD_CEILING = 100 but never reaches it. Negative margins pass through. This stops stacked modifiers from pinning a sector at a free 100%.

Data#

Reads and writes (collection, fields):

Collection Fields Access Player-visible
subsidies countryId, scope, stateId, scopeType, targetSectorType, targetStrategyId, domesticOnly, active, sourceBillId, createdAt, updatedAt Written by applySubsidyProvision and applyEndSubsidyProvision; read each turn by getActiveSubsidies (active: true) Through the bill view and the sector margin breakdown; the document itself is not exposed
corporations headquartersState, countryId, liquidCurrencyCode Read Yes (corporation pages)
corporateSectors corporationId, stateId, countryId, sectorType, revenue, realizedRevenue, strategyId Read Yes (sector detail)
federalBudget spending.byCategory.sectorSubsidies, spending.total, surplus, updatedAt Written each turn by processSubsidyBudget () Yes, as the sector-subsidies spending line
stateBudgets spending.byCategory.sectorSubsidies, spending.total, surplus, balance, updatedAt Written each turn by processSubsidyBudget Yes, as the state budget line
gameConfig (_id: "default") marketSystemMode Read to choose the revenue basis No
sentimentPulses scope: "sector", sectorType, countryId, initialImpact, decayRate, eventType (subsidy_created, subsidy_ended), createdAt Written for sector-scoped enactment and end No (moves share prices)

The subsidies collection is region-scoped by stateId, so a country merge re-points state rows (, ).

Configuration#

Timing#

Worked trace#

A healthcare sector operates in state S of country C. Its base profit margin is 12. Two active subsidies exist: a national economy-wide one (scopeType: economy_wide, domesticOnly: false) and a state one for S (scopeType: sector, targetSectorType: healthcare, domesticOnly: false). The sector's nameplate revenue is 10,000,000 per turn. The world is below the plants tier, the country's currency is the anchor (rate 1), and there are no tariffs or other modifiers.

  1. Qualification, national: scope is national and sectorCountryId === C, scope type is economy-wide, no strategy filter, not domestic-only. It qualifies.
  2. Qualification, state: scope is state and sectorStateId === S, sectorPolicyTargetMatches("healthcare", "healthcare") is true, no strategy filter. It qualifies.
  3. Margin modifier: 7.5 + 7.5 = 15 (getSubsidyMarginModifier).
  4. Effective margin: softCapEffectiveMargin(12 + 15) = 27, below the 80 knee so unchanged.
  5. High-margin variant: a base of 75 gives raw 90, and 80 + 20 x tanh((90 - 80) / 20) = 80 + 20 x 0.4621 = 89.24. The last points are worth less near the ceiling.
  6. Cost, national subsidy: it covers every qualifying sector in C. For this sector, 10,000,000 x 48 x 0.105 = 50,400,000 a year in anchor units, added to the country's sectorSubsidies line in federalBudget, then converted to C's currency before the write.
  7. Cost, state subsidy: only sectors in S qualify. Here the same sector gives 50,400,000 into the stateBudgets document for S.
  8. Realized-revenue variant: under plants with realizedRevenue 4,000,000, each cost is 4,000,000 x 48 x 0.105 = 20,160,000. The margin bonus is unchanged.
  9. Budget write: surplus = revenue.total - spending.total is recomputed and the document is written only if the line, total or surplus changed.

Edge cases and limits#

Invariants#

Failure and recovery#

Connections#

Driven by:

Affects:

Related pages:

Key files:

File Purpose
Subsidy qualification and margin calculation
Subsidy application during turn processing (margin stack)
Writes the annualized subsidy cost into federal and state budgets each turn
sectorPolicyTargetMatches, softCapEffectiveMargin
Annualized government budget cost of active subsidies
Subsidy provision enactment (calls applySubsidyProvision/applyEndSubsidyProvision)

Tests#

Known issues and history#

Last checked: 2026-10-29, version 1.18.0

Ask