Ghosty

Ghosty: market intelligence besides you 24/7. It speaks the news so you never miss a move.

Ghosty

Created At

ETHGlobal Mumbai

Project Description

Ghosty is a pocket-sized voice pod with a private trading copilot inside. It watches crypto and world news around the clock (four news wires, Polymarket odds and a Claude web-search scout), scores every source for credibility with Ethos, and stays quiet until a headline can actually move your positions: a war, a sanction, an exchange hack.

When that happens, Ghosty buys a short "headline intelligence" report from an independent seller, paying for it itself over x402 on Hedera. It then asks its brain on 0G Compute what the news means for you, and speaks the answer out loud: "Strikes near Hormuz. I suggest a small long on gold. Press to confirm." One press within two minutes opens a capped Hyperliquid perp (gold, oil, stocks or BTC) plus a small Uniswap swap on Base. No press, no trade.

You can also just talk to it. Hold the button and ask "what's moving gold?" and it answers from live prices and headlines.

Ghosty is accountable and private by design. Every decision is written to 0G Storage as a tamper-evident chain of episodes with its 0G request ID, and every payment and trade is posted to a public Hedera audit topic. Your memory and trading style are encrypted with your own key on 0G, not kept in our database. It pays for information on its own, inside daily caps, but it never moves your money without a press. If its brain is unreachable it says so and refuses to trade, rather than guessing.

There's also a web app with Live, Device and Feed views, and a Simulate mode that replays real past events (the SEC suing Binance, the Bybit hack, the Israel-Iran strikes) on historical prices with real 0G decisions and paper trades.

How it's Made

Hardware. An ESP32-S3 (N16R8) with an INMP441 I2S microphone, a MAX98357A I2S amp and speaker, one button, and a 3D-printed ghost enclosure (we wrote a small STL generator for it). Firmware is Arduino core 3.x with the new ESP_I2S driver. Hold-to-talk records 16 kHz mono PCM into PSRAM, adds a WAV header, and POSTs it. The server streams back raw 16 kHz PCM, which we write straight to I2S. We deliberately skipped MP3 decoding on the device: the usual library is GPL and grabs its own I2S channel. The pod talks HTTPS to our Dockerised server on AWS, with the Amazon root CAs pinned in firmware.

Server. Node 22, TypeScript and Fastify, with zod-validated config and server-sent events for the UI. It has a strict "live" mode with no stand-ins: a provider without keys returns "not configured" instead of fake data. A provider-health registry and a doctor command probe every integration. 322 tests.

Voice and research. Groq whisper-large-v3-turbo for speech-to-text, and ElevenLabs flash v2.5 asked for pcm_16000, so the bytes go straight to the speaker. Claude Sonnet 5.5 answers spoken questions from live context, and its web_search tool runs a news scout. An intent router sends questions to Claude and anything about trading to 0G.

0G. Compute through the OpenAI-compatible 0G router (glm-4.7, JSON mode, zod-validated output, one retry). We capture the router's own request ID for every decision. If 0G is unreachable, a safe-stop engages and nothing trades. Storage through the 0G TypeScript SDK:

  • Memory is encrypted with AES-256-GCM before upload. We chose GCM over the SDK's built-in AES-CTR so a wrong key or a tampered blob fails loudly.
  • Each decision is an "episode" that stores the previous episode's root hash, so the log is a verifiable chain.
  • All uploads go through one serial queue, so two writers never race on wallet nonces. 0G is what makes Ghosty accountable: you can hand a judge a root hash and ask "why did it buy gold at 3 a.m.?"

Hedera. x402 with @x402/core, @x402/hedera and @x402/fetch.

  • The "Signal Desk" is a separate merchant service with its own account. It sells a bundle of Ethos source credibility, how many outlets corroborate the story, and shock severity. The agent buys it before each 0G decision and the decision uses it.
  • Payment prefers USDC as an HTS token, with HBAR as fallback.
  • After the facilitator settles, we check the transfer ourselves on the Hedera mirror node before marking it paid.
  • Payments, decisions and trades go to an HCS topic as small structured JSON, with a dedicated submit key that holds no funds.
  • Custody is split three ways: a treasury, a capped agent hot wallet, and the merchant. Per-asset daily caps; an idempotent hedera:setup script. Hedera's ~3 s finality and sub-cent fees are what make paying per headline practical.

Execution. Hyperliquid through @nktkas/hyperliquid, signed by an API (agent) wallet that can trade but never withdraw. We use HIP-3 builder markets on the xyz dex (gold, oil, US stocks), computing asset IDs as 100000 + dex × 10000 + index. A leg-fitting step keeps every order above Hyperliquid's $10 minimum and under our cap. The spot leg uses the Uniswap Trading API (check_approval, quote, swap) with native ETH on Base, signed with viem.

Web app. React, Vite and TypeScript, built on our own design tokens. An SSE reducer batches event bursts so the feed never jumps. The Device page doubles as the pod: browser mic to 16 kHz WAV to the same endpoint the hardware uses. That let us test the whole loop before the hardware was ready.

Simulation. It replays real past events with their real headlines and sources, on a compressed clock. Every decision is a real 0G call, but trades fill on a paper venue at historical prices. Replay walks the episode chain back from 0G Storage.

Hacky bits worth mentioning.

  • Hyperliquid only keeps hourly candles back to April 2026, so the historical simulations are priced from Binance's public klines, with PAXG as a proxy for gold.
  • Our ISP reset connections to the 0G testnet router and to Polymarket. So compute runs on the 0G mainnet router while storage stays on Galileo testnet, and the health monitor degrades gracefully instead of failing.
  • The mic and the amp share one I2S port's clocks in full duplex, and the 24-bit INMP441 samples are shifted into 16-bit audio on the fly.
  • A confirm only executes an alert the wearer has actually heard, and only within 120 seconds. A stray button press can never trade.
background image mobile

Join the mailing list

Get the latest news and updates