Skip to content

Territory — WORLD.Code() Cadence

TL;DR: Each WORLD.Code() fires META.Beat → RING.Eta → PANG.Push, each of which mutates state. Codes within the same block influence each other. Plan sequences, not one-shots.

Why this matters

WORLD.Code() isn't an atomic reward claim; it's a chain of state-mutating calls that feed back into themselves. The first Code at a location changes what the second Code there returns. A naive "loop 10 Codes at the same (lat, lon)" probably doesn't yield 10× the VITUS.

Understanding cadence lets you design sequences that actually compound.

The numbers

Inside WORLD.Code(Latitude, Longitude, Cause), these happen in order:

  1. Range lookup. Read QING position from Map.Compliment(QingWaat).
  2. META.Beat(QingWaat). Internally:
  3. Calls Ring.Eta() which calls Yue.React(Phobos) and Pang.Push(Phobos.Waat()).
  4. Calls Pang.Push(QingWaat) separately.
  5. Returns (Dione, Charge, Deimos, Yeo).
  6. Range check. |Latitude - qlat| ≤ Yeo etc.
  7. Creator tracking. _creators[Latitude][Chi][Cause] += Deimos.
  8. VITUS mint. Vitus.Mint(Chi, Dione).

What each sub-call mutates

Sub-call Storage write Source
Yue.React(Phobos) Hypobar[Phobos] += Omega, Epibar[Phobos] += Omicron (in your YUE) YUE
Pang.Push Triggers Soeng chain reactions; Omicron/Omega/Iota updates inside PANG's own storage PANG
Ring.Eta Moments[Soul] = Iota (overwrites; does not accumulate) RING
WORLD._creators Accumulates Deimos per (Latitude, Chi, Cause) WORLD
VITUS.Mint Mints Dione VITUS to Chi (with overflow cascade, see Economic: Overflow Play) VITUS

What doesn't move between Codes

Thing Why it's stable across a single block
Meridians[...] Constants; never change.
QING.Waat, QING.Entropy() QING-mutable but not triggered by your Code.
YANG.Pole[...] Bumped only on YAU/ZHOU/Lai reactions, not by Code.
Other players' YUE React balances Only your own Yue.React(Phobos) runs during your Code.

The play

  1. Two Codes in one block at the same (lat, lon) — the second one's Dione and Yeo will differ from the first because RING.Eta has overwritten Moments[Soul] and YUE.React has bumped your Hypobar/Epibar for Phobos.
  2. Rotate latitudes, not positions. Since _creators buckets by Latitude, doing Code(lat=a, lon=1), Code(lat=b, lon=2), Code(lat=c, lon=3) spreads your tracking across three distribution lanes rather than concentrating at one.
  3. Code early in your tx, not late. If you bundle a Code with other RING/PANG-touching ops in the same tx, order matters. The Code that runs first operates on cleaner state.
  4. (inferred) Don't burn through Codes in one block. Moments[Soul] overwrites on each Eta(); you lose the ability to read back "what was my Iota at the first Code." If you care about the historical moment, leave at least one block between Codes.
  5. Redeem via YUE, not Withdraw. VITUS minted to YUE can be swapped (Hong/Hung) without ever withdrawing. Keeps the 40× Yuan multiplier on the ride. See Power: Yuan Composition.
  6. Watch Dione == 0. If the returned Dione is zero on the first sim, the Code goes through but mints no VITUS. Check Dione before spending gas.

Worked example

You plan 5 Codes at the same QING. Two options:

Option A — spray within one block: Fire 5 Codes back-to-back in one tx.

  • Code 1: Dione = D₁, Yeo = Y₁. Moments[Soul] overwritten with Iota₁.
  • Code 2: Dione may differ because Ring.Eta output shifted. Yeo = Y₂ ≠ Y₁. Moments[Soul] = Iota₂.
  • ...
  • Sum of Diones likely < 5 × D₁, because each subsequent Dione is influenced by state you just changed.

Option B — spread over 5 blocks: One Code per block.

  • Each Code samples fresh state between blocks (other players' activity perturbs PANG/YUE in the meantime).
  • Sum might be higher or lower than Option A, but has different variance characteristics.

There's no universal winner. Pick the approach that matches what you're optimizing — pure gas efficiency (A) or noise-smoothing (B).

Gotchas

  • No revert on zero Dione. You can Code, mint 0, pay gas, walk away with nothing except a bumped Moments[Soul] and bumped _creators entry (of 0).
  • Distribute is separate. _creators accumulates until the Cause token's owner calls Distribute. Your "earned" territory isn't spendable until Distribute runs.
  • Whitelist gate. Distribute requires the Cause token's owner to have whitelisted the Distributive. See WORLD.Whitelist. A non-whitelisted Distributive can't pull.
  • (inferred) Many-cause strategy. If you Code with Cause = A vs Cause = B, you build separate _creators entries. Diversifies who can Distribute-pay-you.
  • Range check uses current Yeo, not the Yeo you sim'd 10 minutes ago. Read it fresh at the time of your actual call.

Where it cross-connects