Skip to content

Bahl-Aryan/NexHacks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

245 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Roly Poly

Educational Prediction Market Visualization with AI-Powered Learning

The Problem

Prediction markets are powerful but intimidating. Users see "$0.65 for YES" without understanding risk, profit potential, or position sizing. We fix that.

Our Solution

Roly Poly makes prediction markets intuitive through 3D visualization and AI explanations. Explore real Polymarket data, adjust sliders, and instantly see outcomes. Poly, our AI guide, explains each section as you scroll. No trading, no risk—just learning.


Features

Feature Description
3D Risk Visualization Interactive cube showing P10/P50/P90 outcomes in real-time
Live Market Data WebSocket-powered real-time Polymarket prices
AI Explanations What happened, why it matters, what to do next
Poly Avatar Scroll-triggered educational hints with voice
Advanced Metrics Kelly Criterion, Sharpe Ratio, VaR, EV calculations
Decision Workflow Structured numeric reasoning for market decisions

Sponsor Integrations

Sponsor Integration Results
Arize Phoenix LLM tracing + evaluation +147% quality improvement via automated feedback loop
Token Company Context compression 40%+ prompt reduction, lower API costs
Wood Wide AI Numeric reasoning Kelly/Sharpe/VaR calculations, structured outputs
DevSwarm Agent orchestration 4-agent pipeline with timing visualization

Quick Start

# Backend
cd backend && pip install -r requirements.txt && uvicorn main:app --reload

# Frontend
cd nexhacks && npm install && npm run dev

Open http://localhost:5173


Demo Flow

  1. Dashboard - Browse live Polymarket data
  2. Select Market - Enter interactive Sandbox
  3. Meet Poly - AI avatar greets and guides you
  4. Adjust Sliders - Watch 3D visualization update
  5. Read Explanations - Understand EV, risk, recommendations
  6. View Metrics - Phoenix traces, compression stats, evaluation scores

Architecture

Frontend (Vite + React 19 + Three.js)
    │
    ▼
Backend (FastAPI)
    ├── /markets, /clob     → Polymarket data
    ├── /sandbox            → Risk calculations
    └── /explain            → AI explanations
            │
            ├── Phoenix (tracing)
            ├── Token Company (compression)
            ├── Wood Wide AI (reasoning)
            └── DevSwarm (agents)
    │
    ▼
Supabase + Polymarket APIs (WebSocket)

Tech Stack

Layer Stack
Frontend Vite 7, React 19, TypeScript, TanStack, Zustand
3D Three.js, React Three Fiber, Recharts
Styling Tailwind CSS 4, Framer Motion
Backend FastAPI, Supabase, OpenTelemetry

Phoenix Quality Improvement

Automated LLM evaluation workflow showing before/after metrics:

Metric Baseline Improved Delta
Overall 0.42 0.78 +86%
Completeness 0.35 0.87 +149%
Has EV 0.25 1.00 +300%
Failure Rate 70% 15% -79%

Links

About

NexHacks Project Submission

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 58.9%
  • Python 40.0%
  • Other 1.1%