Architecture
How the system fits together: the signal engine, the attestation, the stack.
System architecture
The client posts a signal to a Node route. The route runs a population of parallel model calls on the gpt-5.6 family, settles the result by consensus, hashes the transcript into a merkle root, and commits that root onchain on Robinhood Chain as transaction calldata (lib/commit.ts), returning a Blockscout link. The app sits behind Privy auth and a $luna access gate.
The signal pipeline
A signal runs stage by stage, from a task in to an attestation out. A population of agents runs the middle stages in parallel, and the result is reproducible: same outputs, same consensus, same root.
The chain
Lunaria settles on Robinhood Chain ↗, a permissionless, EVM-compatible L2 built on Ethereum with the Arbitrum stack. Gas is paid in ETH, and Blockscout ↗ is the explorer every proof link resolves to. One env var, CHAIN_NETWORK, flips the whole app between mainnet and testnet; lib/chain.ts holds the constants so the client, the server commit, and the CLI scripts always agree.
| mainnet | testnet | |
|---|---|---|
| chain id | 4663 | 46630 |
| gas | ETH | ETH |
| public rpc | rpc.mainnet.chain.robinhood.com | rpc.testnet.chain.robinhood.com |
| explorer | robinhoodchain.blockscout.com ↗ | explorer.testnet.chain.robinhood.com ↗ |
The attestation itself needs no contract: each epoch's merkle root rides as calldata in a 0-ETH self-transfer signed by the network payer (BOUT_PAYER_KEY), so the proof is a plain transaction anyone can open and decode.
The stack
- Next.js 16 (App Router) and React 19. The site is statically generated; the signal engine is a Node route.
- viem for everything onchain: the ERC-20 $luna balance read, the calldata commit, and the verification scripts.
- The mark is a blue dithered orb. Everything is set in Orbitron display over IBM Plex Mono, on a dotted star atlas, with three.js orbs for the population. Reduced-motion aware.
- Inference runs the gpt-5.6 family (Luna / Terra / Sol) over an OpenAI-compatible endpoint, configured by env.
- Auth is Privy: connect an external EVM wallet (MetaMask, Rabby, Coinbase) or sign in with email and get a secure embedded wallet. The app gates on holding $luna; the landing, docs, and
/verifystay public. Signals persist in a Redis-backed store, so any signal is verifiable by id. - Onchain attestation is wired end to end: each epoch's merkle root is committed onchain on Robinhood Chain as transaction calldata (
lib/commit.ts) with a Blockscout link. A dedicated attestation contract can replace the calldata commit later.
