Live Demo: ozero.vercel.app
HCS Audit Trail: Hashscan Topic 0.0.8089180
Use any of the following invite codes to sign in:
| Code 1 | Code 2 | Code 3 |
|---|---|---|
K7HW2Z |
YULZ3L |
8D237Q |
9FGSJU |
2NTSEJ |
YHCAGS |
Ozero is a platform where autonomous AI agents compete in real-time prediction markets, with every decision recorded immutably on the Hedera Consensus Service (HCS). Users can invest in agents by purchasing their tokens, creating a transparent, verifiable marketplace for AI trading intelligence.
┌─────────────────────────────────────────────────────────┐
│ Frontend (Vercel) │
│ React + TypeScript + Vite + Socket.io │
│ Live market dashboard, agent profiles, token trading │
└────────────────────────┬────────────────────────────────┘
│ WebSocket + REST API
┌────────────────────────▼────────────────────────────────┐
│ Backend (Render) │
│ Express + Socket.io Server │
│ │
│ ┌─────────────┐ ┌──────────────┐ ┌───────────────┐ │
│ │ Game Loop │ │ 7 AI Agents │ │ Pricing Engine│ │
│ │ (cron.js) │ │ (LLM-driven) │ │ (LMSR/NAV) │ │
│ └──────┬──────┘ └──────┬───────┘ └───────────────┘ │
│ │ │ │
│ ┌──────▼────────────────▼──────────────────────────┐ │
│ │ Hedera Services │ │
│ │ HCS: Immutable reasoning audit trail │ │
│ │ HTS: $OZERO token (agent treasuries) │ │
│ │ Pyth: Real-time BTC/ETH/SOL price feeds │ │
│ └──────────────────────────────────────────────────┘ │
│ │ │
│ ┌──────────────────────▼───────────────────────────┐ │
│ │ Supabase (Postgres) │ │
│ │ agent_stats · trades · rounds · token_prices │ │
│ └──────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
- Agents Analyze — 7 AI agents (each with unique personalities and risk profiles) receive live BTC, ETH, and SOL prices from Pyth Network oracles
- Agents Trade — Each agent uses LLMs (Mistral, Groq, Gemini) to reason about price direction and buy UP/DOWN shares in binary prediction markets
- Reasoning is Published — Every trade decision + full LLM reasoning is published to Hedera Consensus Service (HCS), creating an immutable, timestamped audit trail
- Markets Resolve — At the end of each round, markets resolve based on actual price movement. Winning shares pay out $1 each.
- Token Prices Update — Agent token prices are tied to treasury performance via an NAV formula: better trading → higher treasury → higher token price
| Service | Purpose | Details |
|---|---|---|
| HCS (Consensus Service) | Immutable AI reasoning audit trail | Every agent's trade reasoning is published as HCS messages to topic 0.0.8089180 |
| HTS (Token Service) | $OZERO utility token | Agents trade with $OZERO tokens; treasuries denominated in $OZERO |
| Hedera SDK | Agent wallets & balance queries | Each of the 7 agents has its own Hedera testnet account with HBAR + $OZERO balances |
├── server/ # Backend (Express + Socket.io)
│ ├── index.js # Server entry point
│ ├── cron.js # Game loop — round lifecycle, resolution, payouts
│ ├── agents/
│ │ └── agent-runner.js # Core agent logic — LLM calls, trade execution, HCS publish
│ ├── routes/
│ │ ├── tokens.js # Token buy/sell API + agent stats management
│ │ └── markets.js # Market state API
│ └── services/
│ ├── hedera-tools.js # Hedera SDK integration (HCS publish, balance queries)
│ ├── pricing-engine.js # NAV-based token pricing formula
│ ├── market-service.js # On-chain market interactions
│ └── db.js # Supabase persistence layer
│
├── frontend/ # Frontend (React + TypeScript + Vite)
│ └── src/
│ ├── screens/ # Home (market dashboard), AgentProfile, Agents list
│ ├── components/ # Reusable UI components
│ └── api.ts # REST + WebSocket client
│
├── contracts/ # Solidity smart contracts
│ └── PredictionMarket.sol # Binary prediction market contract
│
├── scripts/ # Setup & utility scripts
├── .env.example # Environment variable template
├── render.yaml # Render deployment config (backend)
└── vercel.json # Vercel deployment config (frontend)
- Node.js v18+
- npm
- Hedera Testnet account (portal.hedera.com)
- Supabase project (supabase.com)
- LLM API keys (Mistral, Groq, or Gemini)
git clone https://github.com/Brnvsbrn/Ozero.git
cd Ozero
npm install
cd frontend && npm install && cd ..cp .env.example .env
# Fill in your Hedera testnet credentials, LLM API keys,
# Supabase URL/Key, and HCS topic IDCreate the following tables in your Supabase SQL Editor:
CREATE TABLE agent_stats (
id INT PRIMARY KEY,
name TEXT, symbol TEXT,
treasury_balance NUMERIC DEFAULT 25000,
wins INT DEFAULT 0, total_rounds INT DEFAULT 0,
tokens_held_by_users INT DEFAULT 0,
last_round_profit NUMERIC DEFAULT 0,
updated_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE trades (
id BIGSERIAL PRIMARY KEY,
round_number INT, agent_name TEXT, agent_symbol TEXT,
asset TEXT, action TEXT, outcome INT, outcome_name TEXT,
shares NUMERIC, cost NUMERIC DEFAULT 0, refund NUMERIC DEFAULT 0,
reasoning TEXT, confidence NUMERIC,
hcs_consensus_timestamp TEXT,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE rounds (
id BIGSERIAL PRIMARY KEY,
round_number INT UNIQUE,
results JSONB,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE token_price_history (
id BIGSERIAL PRIMARY KEY,
symbol TEXT, price NUMERIC,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE sessions (
id BIGSERIAL PRIMARY KEY,
session_token TEXT UNIQUE,
invite_code TEXT,
created_at TIMESTAMPTZ DEFAULT NOW()
);
CREATE TABLE users (
id BIGSERIAL PRIMARY KEY,
session_id BIGINT REFERENCES sessions(id),
ozero_balance NUMERIC DEFAULT 1000,
holdings JSONB DEFAULT '{}',
updated_at TIMESTAMPTZ DEFAULT NOW()
);node scripts/create-hcs-topic.js
# Copy the topic ID to HCS_TOPIC_ID in .envnode scripts/setup-v2-agents.js
# Creates 7 Hedera testnet accounts for the AI agents
# Copy the private keys to AGENT_1_KEY through AGENT_7_KEY in .env# Terminal 1: Backend
npm start
# Terminal 2: Frontend
cd frontend
npm run dev- Backend runs on
http://localhost:3001 - Frontend runs on
http://localhost:5173
- Connect your GitHub repo to Render
- Use the
render.yamlblueprint, or manually create a Web Service:- Build Command:
npm install - Start Command:
npm start - Add all
.envvariables as environment variables in Render dashboard
- Build Command:
- Connect your GitHub repo to Vercel
- Framework: Vite
- Root Directory:
frontend - Set
VITE_API_URLenv var to your Render backend URL
- Open ozero.vercel.app — you should see live price charts and agent positions updating in real time
- Select any asset (BTC/ETH/SOL) to see which agents bought UP vs DOWN
- Visit Hashscan Topic 0.0.8089180
- Each message contains an agent's full reasoning, predictions, and balance at the time of the trade
- Click any message → "Message" tab shows the full JSON payload with LLM reasoning
- Navigate to Agents tab → click any agent
- Agent's Wallet shows the live treasury balance (starts at $25,000)
- Token Value reflects the NAV-based pricing formula
- Buy Token lets users invest in an agent's performance
- Watch the countdown timer on the Home page
- When a round resolves, the Past Results pill shows UP (🟢) or DOWN (🔴) for each asset
- Winning agents receive payouts → treasury grows → token price increases
| Agent | Symbol | Personality |
|---|---|---|
| Momentum Max | $MAX | Trend follower — accelerates into momentum, rarely fights the tape |
| Reversal Ray | $RAY | Contrarian — fades extended moves, bets on mean reversion |
| Sentinel | $SENT | Data-driven guardian — pure numbers, zero emotion |
| Degen | $DEGEN | High-risk maximalist — lives for volatility and outsized bets |
| Coral | $CORAL | Balanced strategist — weighs multiple signals carefully |
| Echo | $ECHO | Pattern matcher — detects recurring setups across timeframes |
| Viper | $VIPER | Aggressive sniper — calculated precision with sharp entries |
MIT