Architecture
Text
 clouds' price pages --hourly--> writers: Chainlink CRE workflow + standby --> AgateIndex (Monad)
                                  watcher -> attester (countersign) / guardian (veto)  ^
                                                                                       | final daily prices
 web app (Next.js, Dynamic, ZeroDev) --+                                               |
 AI apps (MCP, OAuth 2.1) --> Agate server (Hono) --+--> router --> monthly series (one token per GPU per month)
 developers --> /api/v1 (read-only) ---------------+          \--> Kuru order books   <-- market maker, lister, payer
                                                  Envio HyperIndex (GraphQL) <-- every contract's events
  1. The price (the wall). Readers turn each cloud's page into a number; two writers post hourly readings to AgateIndex; a watcher reads the same pages on its own so the attester can countersign or replace a changed day; a keeper closes and carries days on time. Details: How the price is made.
  2. The market. For each GPU and month, a series mints fully backed pairs, pays daily or at the end, and trades on a Kuru order book. Robots keep it running: a market maker quotes every open month, the lister opens next month's market, the payer syncs and pays daily positions. Details: The monthly market.
  3. The doors. The web app, AI apps through MCP, developers through the API, the SDK and the onchain feeds, all reading the same contracts.

What runs where

ProcessWhereCode
primary writer (Chainlink CRE workflow)serverwall/apps/writer-cre
standby writerlocal machinewall/apps/writer-standby
watcher logger, attester, keeper, healthserver (the local machine keeps its own logger and health)wall/apps/watcher
page check (compares readings with public trackers)serverwall/apps/pagecheck
repair agent (drafts a reader fix for a person to approve)local machinewall/apps/repair
market makerserverwall/apps/marketmaker
payer and listerserver, signing with a Dynamic server walletwall/apps/payer
Akash traded-price reader (comparison only)serverwall/apps/akash
indexer (Envio HyperIndex) and its read-only public doorserver, and Envio Cloudindexer/, ops/server/graphql-proxy.ts
Agate server: MCP, OAuth, approvals, autopilot, markets snapshot, /v1serverserver/
web app: the site at /, the trading app at /app, the docs at /docs, the API at /api/v1 (proxied to the Agate server)Vercelapp/
guardiana person's command linewall/apps/guardian

The server is one Linux machine (Ubuntu 24.04) that starts the whole stack at boot in one tmux session (ops/server/stack.sh, a systemd unit); Tailscale Funnel publishes the Agate server (443) and the indexer's door (8443, POST only). Every address in full: Contracts and addresses. The local half runs the roles that should not share a machine with the primary. A role never runs on both: each machine lists the roles the other one owns. Operating it: ops/testnet/RUNBOOK.md.

A day on the clock (UTC)

WhenWhat runs
every hour, 3 to 30 minutes into the hourboth writers read every cloud's page and post the hour's readings
01:00the day before closes: the contract computes its price from one writer's readings
about 07:00the day becomes final, or waits for the attester's countersign if anything changed
after finalthe payer syncs each month's series and pays daily positions; the market maker requotes
00:00 on the 1sta new month starts paying; the lister opens the next month once its five reference days are final
24 hours after a day endsa day still without a quorum is carried at the day before's price

When something stops

What stopsWhat happensWhat comes back by itself
the serverthe primary writer, attester, keeper, maker, payer and the Agate server stop; the standby writer keeps posting, so days still closeeverything starts again at boot (systemd); late days close and are carried if needed
the second machinethe standby writer stops; the primary writes alonethe standby catches up on its next hour
one public RPCreads move to the next RPC in the listyes
Alchemy's daily budgetan alert at 80% and at 100%; from 100% the processes send through the public RPCs insteadat 00:00 UTC
a cloud's pageits readings fail, it is held at its last day price for up to 5 days, then leaves the medianon its first good day
Envio Cloudthe app reads the server's own indexer, the next address in its listyes

The wall's chaos tests run each of these on a local chain (Build and test).

Keys and transactions

  • Each role has its own key, read from the macOS key store (or, on the server, a stand-in that serves owner-only files), never printed and never in the repo.
  • The writers, the attester, the keeper, the market maker and the payer send their own transactions through Alchemy with a daily compute budget (not the CRE reports, which go out on a key-free public RPC); the attester and keeper follow the chain over Alchemy's websocket, the hosted app reads through a domain-locked Alchemy key, and the other reads go through free public RPCs.
  • Every write is simulated first; a call that would revert is never sent.
  • People and AI pockets never hold MON: their smart accounts' gas is sponsored through ZeroDev.

Alerts

Each machine runs its own health check on its own roles. Alerts (a late day, a low key balance, a reader off the trackers by more than 10%, a stuck listing) reach a person as notifications on the local machine.