Skip to content

hackonteam/surge

 
 

Repository files navigation

Surge

Vol-Arb Sentinel + Surface Studio for DeepBook Predict on Sui Sui Overflow 2026 · DeepBook track · solo build

Surge proves DeepBook Predict's vol surface is real by trading the gap between it and Polymarket, live, on-chain.

Two artifacts share one ingestion pipeline:

  1. Vol-Arb Sentinel — a keeper bot that streams OracleSVIUpdated events, fits an SVI smile, fetches Polymarket BTC option prices at the matching expiry, and when the implied-vol spread exceeds a Kelly-sized threshold, fires predict::mint via a Programmable Transaction Block.
  2. Predict Surface Studio — a public Next.js dashboard that renders the live 3D vol surface, overlays the Polymarket smile, runs arb-free butterfly + calendar checks, and exposes the bot's trade ledger with Suiscan deep links.

What's built

All MVP features are implemented and tested on testnet. See PROJECT_BRIEF.md for the original scope and docs/ARCHITECTURE.md for design details.

Layout

.
├── packages/
│   └── core/             @surge/core — types, SVI math, arb checks, PTB builders
├── apps/
│   ├── ingestion/        @surge/ingestion — OracleSVIUpdated subscriber + cross-venue fetcher
│   ├── keeper/           @surge/keeper — vol-arb decision loop + signing
│   └── dashboard/        @surge/dashboard — Next.js + react-three-fiber UI
├── scripts/
│   └── validate-schema.ts  R-02 mitigation: confirms event shape on testnet
├── docs/
│   ├── ARCHITECTURE.md
│   └── DEMO_SCRIPT.md
└── PROJECT_BRIEF.md      Strategic plan (track analysis → MVP → risks)

Features

  • Live 3D SVI vol surface — real-time react-three-fiber rendering of DeepBook Predict's implied volatility surface
  • Cross-venue smile overlay — Polymarket / Deribit implied vols plotted alongside the Predict surface with spread region highlighting
  • Arb-free checks — butterfly (vertical) and calendar (horizontal) no-arb condition monitors
  • Vol-arb keeper bot — Kelly-sized position sizing, predict::mint PTB execution, automatic edge detection
  • Trade ledger — full PnL attribution per trade with Suiscan deep links for on-chain verification
  • Oracle feeder lag pill — live latency indicator with auto kill-switch when the feeder falls behind
  • Demo mode — lowered edge threshold for walkthroughs without requiring live arb opportunities

Dashboard

Surge dashboard

Quickstart

# 1. Install
pnpm install

# 2. Configure — copy and edit .env (NEVER commit)
Copy-Item .env.example .env
# Edit .env: set BOT_PRIVATE_KEY (use a dedicated throwaway wallet)

# 3. Validate the on-chain event schema (R-02 critical-risk mitigation)
pnpm validate:schema

# 4. Run ingestion (OracleSVIUpdated subscriber + cross-venue fetcher)
pnpm dev:ingestion

# 5. Run the vol-arb keeper bot
pnpm dev:keeper

# 6. Run the dashboard locally
pnpm dev:dashboard

# 7. Bootstrap the bot manager (creates KeeperCap + positions)
pnpm bot:bootstrap

Integration targets (Predict testnet, predict-testnet-4-16)

Source of truth: packages/predict/README.md

Item Value
Predict package 0xf5ea2b3749c65d6e56507cc35388719aadb28f9cab873696a2f8687f5c785138
Predict object 0xc8736204d12f0a7277c86388a68bf8a194b0a14c5538ad13f22cbd8e2a38028a
Quote asset 0xe95040085976bfd54a1a07225cd46c8a2b4e8e2b6732f140a0fc49850ba73e1a::dusdc::DUSDC
Indexer https://predict-server.testnet.mystenlabs.com

Surge requires dUSDC (NOT official testnet USDC). Request it via https://tally.so/r/Xx102L.

Status

Week 4 / pre-submission — all MVP features built and tested. See PROJECT_BRIEF.md for scope and docs/ARCHITECTURE.md for design.

Demo

Demo video (YouTube) — ≤5 min walkthrough of the full flow.

Security notes

  • Private keys are loaded from .env only. .env is gitignored. Never commit a key, even encrypted.
  • The bot wallet is a dedicated throwaway. Do not reuse mainnet wallets.
  • All entry points are read-only until you set BOT_PRIVATE_KEY and run the keeper.

License

Apache-2.0

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 86.7%
  • JavaScript 7.4%
  • HTML 3.0%
  • Shell 2.9%