Devlog  /  sim build 0.0.1

The Whipsaw

A stock-flow-consistent economy simulation, written in Rust. This is the build log: what broke, what the numbers actually said, and which of my own instruments turned out to be lying.

We switched off every survival mechanism, and look at exactly how it dies

Autopsy on one of the 31 firms already stalled at tick 5. Sawmill, firm 52:

tick 0: cash 1602  produced 20.859  output stock 159.671
tick 1: cash 1200  produced 20.859  output stock 180.530
tick 2: cash  755  produced 20.800  output stock 201.330
tick 3: cash  260  produced 20.627  output stock 221.957  ← ordered 0 electricity
tick 4: cash    0  produced  0.000  output stock 221.957  ← dead forever

It runs perfectly. It never sells a thing. Stock goes 159 → 222 and that’s the whole story.

Clearing ranks by price, the cheap sellers take all the demand, everyone dearer sells nothing. Its response is to cut price 1% a tick. Its liquidity buffer was four ticks of spending. Four ticks to burn out, twenty ticks to get competitive. Death is twenty times faster than adaptation. So the economy comes out bimodal, half the firms pinned at the capacity ceiling and half dead in week one.

Side finding from the same autopsy, and this one is worse: hired 4.469 with cash at 0. A dead firm keeps hiring labour it can’t pay for. Employment allocation never asks about money, the wage fund just gets clipped by whatever is left. Those workers count as employed, get nothing, and aren’t available to anyone who would have paid them.

Two changes, hire only what you can pay for and a 24 tick buffer instead of four, and nothing stalls in the first 20 ticks, GDP holds 136–168 thousand. The ratchet comes back after that, but slowly, and it looks like dynamics rather than a cliff.

The thing worth saying out loud: proportional rationing plus a budget constraint isn’t an implementation bug. Firms die like that in real life. We just turned off every rescue institution at once, expansion into the periphery (§5.2), bankruptcy with restructuring (§5.6), working capital credit. With none of them, firm death is an absorbing state and no amount of calibration touches it. Stage 1 is walking through the reasons those sections are in the spec, empirically, one at a time.