Crypto OS

Machine Economy Simulator

An economy with 1,000 users and 100 agents. Set nine rules, face nine crisis categories, and see whether it survives.

This is the playable version of Create a Machine Economy, the most advanced capstone.

The setting is identical: 1,000 users, 100 agents, one settlement stablecoin, one chain, and one market. Set a rule for each of nine areas, then the system randomly triggers five of nine crisis categories.

You are examining how your rules fail, not guessing the future.

What it is

This is a rule model, not a forecasting model.

It does not claim to predict the evolution of real machine economies. Nobody can. It guarantees one thing:

The same rules and seed always produce the same result.

Every loss can therefore be traced to a specific rule. That is its teaching value: controlled experiments rather than gambling. Change one rule, rerun, and inspect the difference.

We set every number in the model; they were not measured. Question those numbers, but pay closer attention to structure: which rule blocks which event, and what each rule costs.

None of the nine rules is free

This is the simulator's main lesson. Every option states both its benefit and its cost.

Choosing all the safest options lets you survive, but transaction volume is tiny and user growth nearly stops. Choosing all the aggressive options makes early numbers look excellent, until one event empties the treasury.

No configuration optimizes every dimension. This is the same principle as the capstone's six follow-up questions after every institutional change.

Start

The defaults pursue growth without defenses: open entry, a hot wallet, service before payment, no reputation, no fee take, token subsidies, and no circuit breaker. Run once to see how it fails, then change rules individually.

Agent IdentityWho can become an Agent in this economy?Chapter 33 Why AI agents might need crypto
WalletHow does an agent hold funds?T34 Agent Wallet & Payment
PaymentMoney or service: which is delivered first?Chapter 35 Will machine payments become a new internet protocol?
ReputationHow can you tell reliable agents from unreliable ones?Chapter 28 What is the essence of crypto growth?
Protocol FeeHow much does the protocol take from each transaction?Chapter 26 How does a protocol make money?
GovernanceWho can change the rules?T29 Protocol Security
SecurityHow does the system protect itself during an incident?T36 Autonomous Onchain Economy
Event seedThe same rules and seed always produce the same result, so every loss can be traced.
16 ticks until collapseRoutine spending exhausted the treasury before any event occurred
Ticks survived
16 / 24
Active agents
186
Retained users
761
Deficit at collapse
-1,833 USD
Total tasks
23,437
Total losses
111,233 USD

The simulation stops at collapse, so the deficit and losses count only up to that tick. A system that lasts longer can accumulate a deeper deficit. Compare configurations by ticks survived first.

Tick by tick record: each loss is linked to the rule that allowed it
1 ticksTreasury 482,000
  • Tasks completed 1,080; protocol revenue $0
  • Subsidy spending $18,000
2 ticksTreasury 463,280
  • Tasks completed 1,123; protocol revenue $0
  • Subsidy spending $18,720
3 ticksRegulatory changesTreasury 399,456
  • Tasks completed 1,166; protocol revenue $0
  • Subsidy spending $19,440
  • Event: Regulatory changes — The main market requires every participant to complete identity checks or it closes deposit and withdrawal channels.
  • User churn 361: identity verification cannot be completed, so deposit and withdrawal channels close
  • Loss $44,384: Build a compliance process in a hurry
4 ticksTreasury 379,296
  • Tasks completed 1,210; protocol revenue $0
  • Subsidy spending $20,160
5 ticksTreasury 358,416
  • Tasks completed 1,253; protocol revenue $0
  • Subsidy spending $20,880
6 ticksTreasury 336,636
  • Tasks completed 1,307; protocol revenue $0
  • Subsidy spending $21,780
7 ticksLiquidity crisisTreasury 279,421
  • Tasks completed 1,361; protocol revenue $0
  • Subsidy spending $22,680
  • Event: Liquidity crisis — Many agents try to convert earnings into stablecoins and exit at once; market depth cannot absorb them.
  • Loss $18,837: No buyers remain in the auction market and the execution price collapses
  • Loss $15,698: With no revenue source, the treasury must dip into principal to defend the market
8 ticksTreasury 255,841
  • Tasks completed 1,415; protocol revenue $0
  • Subsidy spending $23,580
9 ticksTreasury 231,361
  • Tasks completed 1,469; protocol revenue $0
  • Subsidy spending $24,480
10 ticksTreasury 205,981
  • Tasks completed 1,523; protocol revenue $0
  • Subsidy spending $25,380
11 ticksOracle failureTreasury 147,207
  • Tasks completed 1,588; protocol revenue $0
  • Subsidy spending $26,460
  • Event: Oracle failure — The price feed stops updating, so all pricing and settlement use stale data.
  • Loss $32,314: Without a circuit breaker, the system keeps settling at stale prices until someone notices
12 ticksTreasury 119,667
  • Tasks completed 1,652; protocol revenue $0
  • Subsidy spending $27,540
13 ticksTreasury 91,047
  • Tasks completed 1,717; protocol revenue $0
  • Subsidy spending $28,620
14 ticksTreasury 61,347
  • Tasks completed 1,782; protocol revenue $0
  • Subsidy spending $29,700
15 ticksTreasury 30,387
  • Tasks completed 1,858; protocol revenue $0
  • Subsidy spending $30,960
16 ticksTreasury -1,833
  • Tasks completed 1,933; protocol revenue $0
  • Subsidy spending $32,220
  • The treasury runs dry and the economy stops.

What the nine events test

Each event tests particular rules. You cannot control the event, but your rules determine the damage.

EventWhat happenedRules testedRead more
Liquidity crisisMany agents try to convert earnings into stablecoins and exit at once; market depth cannot absorb them.Market, Protocol FeeChapter 15
Oracle failureThe price feed stops updating, so all pricing and settlement use stale data.Market, SecurityT21
Agent attacksSomeone registers agents in bulk and uses fake tasks between them to inflate activity and claim subsidies.Agent Identity, Reputation, TokenT29
Stablecoin depegThe stablecoin used for settlement drops to 0.93, shrinking every balance denominated in it.Payment, SecurityChapter 13
Token crashThe protocol token falls 70% in a week.Token, Protocol FeeChapter 21
AI hallucinationsMany agents produce wrong results from a fabricated claim, and users demand compensation.Reputation, Payment, SecurityChapter 31
Model failsThe underlying model service goes down for six hours; no agent can finish its task.Reputation, PaymentT35
Wallet compromisedA batch of agent signing keys leaks; attackers begin draining balances.Wallet, SecurityT34
Regulatory changesThe main market requires every participant to complete identity checks or it closes deposit and withdrawal channels.Agent Identity, GovernanceChapter 24

How to use it

Run the defaults and read the full log.

Do not rush to change anything. Identify the first deficit tick, the final blow, and the rule listed after each loss.

Change one rule at a time and keep the seed fixed.

This controls variables. Replace the single main wallet with session keys and limits, leave everything else unchanged, and rerun. Theft losses fall by an order of magnitude.

Change two rules together and you cannot tell which caused the difference.

Change the seed and run the same rules three more times.

Different seeds produce different event combinations. Surviving one seed alone is luck, not robustness.

Identify the event your configuration fears most.

Every configuration has a weakness. Find it, then decide whether to fix it or accept it and document what you explicitly do not defend against.

Acceptance is a legitimate answer if documented. T30's threat modeling discusses this.

Write your design explanation.

The simulator output is not the artifact; your explanation is. Give every rule three lines: what you chose, why, and how you will bear its cost.

This begins that capstone's design document.

Conclusions worth verifying yourself

These relationships hold within the model. Do not take my word for them; run it yourself.

Relationship to the capstone

The simulator covers only part of the capstone. It executes rules for you but does not design them.

The capstone asks you to define event impact paths, justify every change, and explain who benefits, who bears costs, and under which conditions it works. The simulator is a repeatable sandbox for making mistakes before writing the explanation.

See the final section of the capstone for complete requirements.

Where the engine lives

Simulation logic lives in packages/curriculum/src/simulator.ts, with twelve unit tests covering determinism, event scheduling, and causal assertions such as defensive configurations losing less than aggressive ones.

The UI contains no simulation logic. Once logic spreads into components, why losses occurred becomes hard to test. This also applies T32's principle: the decision-making part must be deterministic and testable.

On this page