Docs
Documentation
How the network is wired, configured and secured.
Architecture
- Next.js App Router, TypeScript, Tailwind, Framer Motion, wagmi + viem, Prisma on PostgreSQL, Zod, Recharts.
- Provider adapters in
src/lib/providers:openai-compatible(vLLM, TGI, Together, Fireworks, OpenRouter…),ollama, and amockthat only exists outside production. - Treasury adapters in
src/lib/treasuryread the treasury contract (totalProtocolFees,computeAllocationBps,totalComputeSpend) and admin-recorded events with tx hashes. - Health, model status, revenue and treasury endpoints return typed "awaiting" / "not configured" states instead of numbers when a source is missing.
Configuration
DATABASE_URL= PostgreSQL (Neon / Supabase / npm run db:local) NEXT_PUBLIC_CHAIN_ID= EVM chain id (Robinhood Chain) NEXT_PUBLIC_RPC_URL= JSON-RPC endpoint — never invented NEXT_PUBLIC_EXPLORER_URL= block explorer base URL NEXT_PUBLIC_TOKEN_CONTRACT= ERC-20 used for holder tiers (blank = "Token contract not configured") NEXT_PUBLIC_TREASURY_CONTRACT=treasury contract (blank = "Awaiting treasury contract integration") GPU_PROVIDER= openai-compatible | ollama | mock GPU_PROVIDER_ENDPOINT= e.g. https://host/v1 (server-only) GPU_PROVIDER_API_KEY= server-only, never sent to the browser AUTH_SECRET= 32+ random bytes for signed sessions ADMIN_WALLETS= comma-separated admin addresses
Wallet authentication
POST /api/auth/noncewith the address → a SIWE-style message containing a single-use nonce.- The wallet signs the message (EIP-191 personal_sign). No transaction, no funds.
POST /api/auth/verifychecks the signature, consumes the nonce and sets an HMAC-signed httpOnly cookie.- Route handlers read the address from the cookie only; a body-supplied address is never trusted.
Credits
- Holder balance → tier (
config/tokenomics.ts, admin-overridable) → credits per epoch, allocated once per epoch with a unique ledger index so it can never double-credit. - Every inference reserves an estimate (prompt estimate + max tokens, +10%) under a row lock, executes, then charges the real usage and releases the reservation. Balances cannot go negative.
- Ledger types:
epoch_allocation,compute_usage,refund,manual_adjustment,protocol_reward.
Developer API
curl -X POST https://<your-host>/api/v1/inference \
-H "Authorization: Bearer lz_live_..." \
-H "Content-Type: application/json" \
-d '{
"model": "llama-3.1-8b-instruct",
"prompt": "Explain community-owned compute in one paragraph.",
"temperature": 0.7,
"maxTokens": 256
}'Data honesty
Nothing on this site is fabricated. No placeholder GPU statistics, no sample revenue, no fake transaction hashes or wallet balances. When a source is missing you will see "Awaiting live network data", "Not connected" or "Not configured" instead.