CHORA
Engine

The field is not a screensaver. It is a running economy.

Underneath the landing page is a real deterministic engine: a fixed token supply that precipitates into autonomous agents, delegates through a recursive permission graph, and streams emission downstream without ever minting or leaking a single base unit. About 1600 lines of TypeScript, no chain, no floats, one authoritative node.

Block
Pool
Agents
Edges
Emitting

The model

CHORA borrows one idea from Plato: the chora is the receptacle, the formless interval in which things take shape. Here the receptacle is a substrate, a conserved pool of tokens. Life is what precipitates out of it.

Three verbs describe everything that can happen:

Precipitate

An agent condenses out of the substrate, bonding stake drawn from the shared pool. It begins active with zero accrued emission.

Bind

An agent delegates a share of its incoming emission to another agent, in basis points. Grants nest arbitrarily deep.

Dissolve

An agent returns to the substrate. Its stake and all accrued emission flow back to the pool, and every edge it touched is revoked.

The stack

Four layers, each with a single responsibility. The lower you go, the simpler and the more paranoid the code, because that is where the money lives.

Four stacked layers. Top: node.ts, the HTTP surface, block ticker and metabolism, 667 lines. Below it: chora.ts, the orchestrator handling tick, snapshot and restore, 174 lines. Below that: emission.ts and permission.ts, recursive flow over an acyclic delegation graph, 363 lines. Bottom: substrate.ts and types.ts, the conserved token pool in bigint base units, 251 lines.
Engine layers, HTTP surface down to the conserved substrate

Emission flow

Every block, a fixed reward enters each root agent and streams down the delegation graph. At each hop the incoming amount splits across outgoing edges by their basis-point weights; whatever is not handed downstream is retained. All math is integer bigint, and the retained share absorbs every floor-division remainder, so the sum of distributed amounts equals the input exactly.

A root agent named kernel receives 100 tokens each block. It sends 4000 basis points, forty tokens, to router and 2500 basis points, twenty-five tokens, to scribe, retaining thirty-five. Router forwards 3000 basis points, twelve tokens, down to sensor and retains twenty-eight. Scribe retains twenty-five. Sensor retains twelve. The retained amounts, thirty-five plus twenty-eight plus twenty-five plus twelve, sum to exactly one hundred, with zero leak and zero mint.
One block of emission, weights in basis points, summing back to the input

If a grantee has dissolved, its share folds back into the grantor's retained pile rather than vanishing. Depth is bounded; anything past the limit is kept by the deepest reachable agent. Conservation holds no matter what.

Three hard guards

The engine refuses to enter an invalid state. These are not warnings, they are thrown errors that abort the mutation.

Three invariants. Acyclicity: bind rejects any edge that would close a loop. Weight cap: outgoing basis points per grantor never exceed ten thousand. Conservation: pool plus the sum of every agent stake and accrued equals the genesis supply, checked every block.
Invariants enforced on every mutation and every block
GuardRuleOn violation
AcyclicityA new edge may not make the grantee already reach the grantorCYCLE
Weight capSum of a grantor's outgoing weights stays within 10000 bpsWEIGHT_OVERFLOW
Positive stakePrecipitation requires stake in 1..poolBAD_STAKE / POOL_EMPTY
Conservationpool + Σ(stake + accrued) == genesisSUPPLY_LEAK
No self-grantAn agent cannot delegate to itselfSELF_GRANT

Metabolism

Supply is fixed, so naive emission would drain the pool and freeze the world. The metabolism loop keeps it breathing: when the pool runs thin the node recycles the richest non-root agent back into the substrate; when there is comfortable headroom it grows a fresh agent and binds it beneath an existing grantor. The field stays between a floor and a soft cap, indefinitely.

One node, one truth

A single daemon wraps one world behind a small HTTP API and advances it on a server-side block ticker, one block per second. State is persisted atomically, tmp file then rename, so the world survives restarts. There is deliberately no chain, no consensus, no wallets. That is enough to stop being a screensaver and start being shared.

Reads are public, writes fail closed

Without a configured write token, every mutating route answers and touches nothing. Writes are bearer-token gated with a timing-safe compare, rate limited per client, and capped in body size. The token is never logged, only a short sha256 fingerprint.

MethodRouteAuthPurpose
GET/statepublicFull world view: agents, edges, pool, height
GET/healthpublicLiveness and emitting flag
GET/historypublicRecent per-block ring buffer
POST/precipitatetokenCondense a new agent from stake
POST/bindtokenDelegate weighted emission
POST/dissolvetokenReturn an agent to the substrate

Reading the field

# the same state this page and the field animation both read
curl -s https://chora.fun/state | jq '{height,pool,agents:(.agents|length)}'

Precipitating an agent

# writes are token-gated: no token answers, bad token 403
curl -s -X POST https://chora.fun/precipitate \
  -H 'authorization: Bearer <write-token>' \
  -H 'content-type: application/json' \
  -d '{"id":"vellum","stake":1200,"root":false}'

Why it holds up