Lily MarketDocumentation
MARKET OPEN
DOCSQuickstart

Quickstart

Clone it, run it, open the pond. The whole thing is one Next.js app with a deterministic engine inside.

Run it

$ npm install
$ npm run dev
▲ Next.js · http://localhost:3000

The landing page already has the simulation running behind it. OPEN THE MARKET drops you onto the water.

Runs are seeded with a mulberry32 generator, so the same seed and config replay the exact same session, tick for tick. That determinism is what makes the lab comparisons and the stress suite possible.

Scenario presets

Three presets on the pond reset the engine into a known configuration. Each one exists to make something specific easy to watch.

PRESETSETUPWATCH FOR
CALM8 frogs, 6 errands/min, 2 basking stones, normal sunlight, no outagesSingle auctions playing out end to end. The best preset for learning the bid fan.
RUSH12 frogs, 14 errands/min, 3 basking stones, normal sunlightThe market at full throttle: crowded lanes, fast tape, congestion heat.
CRISIS10 frogs, 10 errands/min, 2 basking stones, scarce sunlight, a stone clouds over mid-runPrices repricing the colony in real time when capacity halves.

Controls on the pond

Speed runs from 0.5x to 4x, and pause stops the whole market (the TICK counter in the top bar freezes with it). Overlays paint the water: CONGESTION shows the crowding field that frogs route around, ERRAND VALUE shows where the money is. Click a frog to open its inspector, which includes the cost breakdown from its last bid. Click an errand to see the standing bids. FOLLOW locks the camera to a frog; the sound button at the bottom of the tool rail controls the voice pack.

The stress suite

$ npm run stress
seed=1 r=8 rate=8 normal: done 214/230 fail 4 exp 2 …
ALL INVARIANTS PASS

The suite runs four scenarios for 30 sim-minutes each, headless, and checks the invariants that matter: no non-finite balances or positions, no frog stuck in a moving phase for more than 90 seconds, no ghost entries in basking queues, no errand left open longer than 200 seconds. It exits nonzero on any failure, so it works as a CI gate.