Skip to content
Build

The ladder

19 worked examples, from a read-only hello-world up through the runtime mechanics to full strategy archetypes — a market scanner, a standing market-maker, a lifecycle janitor, a self-learning allocator. Each rung adds one idea over the last. The runtime deep-dives hang off the rung that first earns them — follow the rungs and you'll meet the guides exactly where they matter.

Start the ladder

New to the runtime? Read How the runner works, Runner architecture, Two boundaries, two planes first.

01Read-only: vault state (start here)read vault state + live market02Fetch a signal from YOUR backendfetch signal from YOUR backend03Signal → tradesignal → first mint (fixed size)04Sizing inside the vault's risk capssize against vault risk caps05Cooldown via ctx.statecooldown via ctx.state06External API + sized trade + cooldownsignal + sized + cooldown combo07Consensus from multiple signal sourcesmulti-source consensus voting08onExecuted: react to outcomesonExecuted: set cooldown on success only09Multi-action atomic transactionmulti-action atomic tx10Failure-aware: learn from on-chain aborts (TTL-based ban)ban strikes after aborts11Multi-trigger plugin (cron + event) + onError minimal patternmulti-trigger (cron + event)12Dynamic sizing from external conviction + audit log + error counterdynamic sizing + audit log13Full pipeline: signal + sizing + cooldown + failure recovery + multi-action + audit log + multi-triggerfull pipeline (everything combined)14Plugin as a folder, with its own local DBschema + db helper next to index.ts (stubs default)15Chaos / control group (on-chain seeded randomness)random-but-valid actions; baseline to beat16Pick the MARKET with a real chance of winningselection: market "with a chance of winning" by edge vs external reference17Standing sigma-ladder market-maker (grid + recenter)market-maker on a ±kσ grid with reconcile + recenter18Pure-lifecycle custodian: never opens, only tidies uppure custody: only redeem by expiry + refreshNav/crystallize permissionless19Online learner: let realized PnL pick the strategyUCB1 bandit that learns from the realized pnlBps (lifecycle)

Operate