# V2 Economy Simulation

`V2EconomySimulation` is the forward-modeling tool for checking whether a
currency economy inflates, deflates, or stabilizes after a configured number of
hours. It uses the V2 currency catalog, player population assumptions, starting
balances, and source/sink flow rules.

## Model

- `FV2EconomySimulationConfig` defines the simulation id, player count, duration
  in hours, snapshot interval, and stability threshold.
- `FV2EconomySimulationInitialBalance` defines starting supply per player for a
  currency.
- `FV2EconomySimulationFlowRule` defines a source or sink with amount per event,
  events per player per hour, active-player fraction, and an optional hour
  window.
- `SimulateEconomy` projects total source flow, applied sink flow, unfunded sink
  demand, ending supply, net flow per player per hour, and trend.

## Interpretation

A currency is `Inflating` when supply growth exceeds the configured stability
threshold. It is `Deflating` when supply loss exceeds the threshold or when sink
demand cannot be funded by available supply. Otherwise it is `Stable`.

Use source rules for quest rewards, match payouts, crafting refunds, vendor sell
grants, and live-event grants. Use sink rules for vendors, repairs, crafting
costs, auction fees, fast travel, rerolls, and other repeatable spends.

## Validation

Run `python3 V2/ue/Tools/check-v2-economy-simulation.py` after changing the
simulation runtime, contract, docs, or CI/Horde wiring. The checker verifies
source/sink modeling, N-hour projection, trend classification, unfunded sink
demand, periodic snapshots, summary formatting, and invalid rule rejection.
