Perpetual On‑Chain Sentiment Markets
Completely bootstrapped during Hyperliquid Community Hackathon
🤔 Problem statement:
- People want to have a transparent, real-time barometer that reflects collective opinion and public mood rather than binary future outcome in prediction markets
- Legacy media craft top-down narratives that don’t always mirror how people truly feel
- Researches and reports say people don’t trust legacy media
💡 Solution:
- Perpetual oracleless sentiment markets powered by LMSR
- Prices continuously encode the crowd’s current sentiment, with economic skin‑in‑the‑game ensuring signal quality
- These markets never resolve via an external oracle unlike traditional prediction markets
⚙️ How it works
r8[rate] is a protocol and app for always-on, oracleless sentiment markets powered by LMSR. Instead of resolving to an external truth oracle, prices continuously encode the crowd’s current mood (e.g. Good/Bad) and update with every trade - keeping sentiment in motion 24/7.
Key idea: LMSR turns opinions into tradable shares. The price of Good vs Bad is the real-time, incentive-aligned sentiment signal. Users open/close positions at any time. PnL comes purely from price changes, no binary resolution needed.
🧠 How it's made

- Protocol on HyperEVM. Core contract R8OpinionMarket.sol implements Hanson’s LMSR with fixed-point math and deterministic accounting. Liquidity is continuous, losses are bounded by b*ln(n) and fees accumulate to a recipient on buys/sells. Settlement token is USDT0. Deployed address and network details are on GitHub.
- LaTeX source of the Paper with novel math for numerically stable multi-option LMSR implementation (rendered as PDF in Github).
- Indexer + analytics API. Node/TypeScript service backfills and follows chain events, takes LMSR snapshots per trade, and exposes typed REST endpoints (/markets, /trades, /market-state, etc.) for the UI. Implemented using Fly.io lightweight containers connected to RPC providers.
- TypeScript SDK. A small client (via viem) provides typed reads/writes (quotes, deposits, trades) so the frontend and external builders can integrate quickly.
- Frontend prototype (Next.js). React 19 + App Router UI that lists markets and shows a market detail page (chart, order ticket, positions). For the hackathon demo it renders from real data and is designed to be wired to the SDK/indexer. Leverages Privy Embedded Wallets and hosted on Vercel.
- R8 Testbed. A small, domain‑specific web app (Vite + React + Tailwind v4; wagmi/viem for wallets and on‑chain calls) for interacting with the native contract and the Indexer’s API, friendlier alternative to raw block‑explorers. Uses the Indexer’s secure RPC proxy instead of a raw RPC URL; CORS/method allowlists prevent abuse and leakage.
- Privy Embedded wallets and native HYPE payments. Much more non-trivial Privy usage described in PRIVY.md and STORY.md in GitHub repo.
- Leveraging HypeRPC connections elsewhere possible.
🧑💻 Links
GitHub - accessible to @HL-Hackathon
Live Demo
Twitter