{"id":50745537,"url":"https://github.com/edycutjong/zebrix","last_synced_at":"2026-06-10T20:30:37.434Z","repository":{"id":357980905,"uuid":"1239393234","full_name":"edycutjong/zebrix","owner":"edycutjong","description":"🏀 Automated NBA referee-assignment alpha trader for Polymarket","archived":false,"fork":false,"pushed_at":"2026-05-15T04:43:50.000Z","size":12724,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-15T06:31:25.212Z","etag":null,"topics":["canon","nba","nextjs","polymarket","prediction-market","trading-bot"],"latest_commit_sha":null,"homepage":"https://zebrix.edycu.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edycutjong.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":"audit.json","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-05-15T03:45:12.000Z","updated_at":"2026-05-15T04:43:53.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/edycutjong/zebrix","commit_stats":null,"previous_names":["edycutjong/zebrix"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/edycutjong/zebrix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fzebrix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fzebrix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fzebrix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fzebrix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edycutjong","download_url":"https://codeload.github.com/edycutjong/zebrix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edycutjong%2Fzebrix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34170162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canon","nba","nextjs","polymarket","prediction-market","trading-bot"],"created_at":"2026-06-10T20:30:35.861Z","updated_at":"2026-06-10T20:30:37.426Z","avatar_url":"https://github.com/edycutjong.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003e\n    Zebrix 🏀\n  \u003c/h1\u003e\n  \u003cp\u003e\u003cstrong\u003eAutomated NBA referee-assignment alpha trader for Polymarket\u003c/strong\u003e\u003cbr/\u003e\n  \u003cem\u003e\"Refs leak points. We trade first.\"\u003c/em\u003e\u003c/p\u003e\n  \u003cimg src=\"docs/readme-hero.png\" alt=\"Zebrix\" width=\"100%\"\u003e\n\n  \u003cbr/\u003e\n\n  [![Live Demo](https://img.shields.io/badge/🚀_Live-Demo-06b6d4?style=for-the-badge)](https://zebrix.edycu.dev)\n  [![Pitch Deck](https://img.shields.io/badge/📊_Pitch-Deck-f59e0b?style=for-the-badge)](https://zebrix.edycu.dev/pitch)\n  [![Pitch Video](https://img.shields.io/badge/🎬_Pitch-Video-ef4444?style=for-the-badge)](https://youtu.be/OkuA9sHAOOs)\n  [![Built for Hackathon](https://img.shields.io/badge/DoraHacks-DEGA_NBA-8b5cf6?style=for-the-badge)](https://dorahacks.io/hackathon/nba-prediction-market/detail)\n\n  \u003cbr/\u003e\n\n  ![Next.js](https://img.shields.io/badge/Next.js_16-black?logo=next.js)\n  ![React](https://img.shields.io/badge/React_19-61DAFB?logo=react\u0026logoColor=black)\n  ![Tailwind](https://img.shields.io/badge/Tailwind_v4-38B2AC?logo=tailwindcss\u0026logoColor=white)\n  ![Supabase](https://img.shields.io/badge/Supabase-3ECF8E?logo=supabase\u0026logoColor=white)\n  ![Polygon](https://img.shields.io/badge/Polygon-8247E5?logo=polygon\u0026logoColor=white)\n  ![TypeScript](https://img.shields.io/badge/TypeScript-3178C6?logo=typescript\u0026logoColor=white)\n  [![Zebrix CI](https://github.com/edycutjong/zebrix/actions/workflows/ci.yml/badge.svg)](https://github.com/edycutjong/zebrix/actions/workflows/ci.yml)\n\n  \u003cp\u003e\n    \u003cstrong\u003eSponsored By\u003c/strong\u003e\u003cbr/\u003e\n    DEGA \u0026 Polymarket\n  \u003c/p\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\n---\n\n\u003cbr/\u003e\n\n## The Edge Nobody Trades\n\nNBA playoff prediction markets on Polymarket are **inefficient by design**.\n\nEvery game, the league publishes referee crew assignments **24 hours before tip-off**. These assignments are public — anyone can see them — but retail traders systematically ignore them. Yet the data screams:\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"33%\" align=\"center\"\u003e\n\n### `+5.7`\n**Over Bias**\u003cbr/\u003e\n\u003csub\u003eTony Brothers' 5-year average point adjustment per game\u003c/sub\u003e\n\n\u003c/td\u003e\n\u003ctd width=\"33%\" align=\"center\"\u003e\n\n### `68%`\n**Home Win Rate**\u003cbr/\u003e\n\u003csub\u003eScott Foster crews favor home teams above league average\u003c/sub\u003e\n\n\u003c/td\u003e\n\u003ctd width=\"33%\" align=\"center\"\u003e\n\n### `≥6%`\n**Edge Threshold**\u003cbr/\u003e\n\u003csub\u003eModel-estimated fair price must exceed market by 6% to trade\u003c/sub\u003e\n\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003e **The signal is free. The market doesn't price it. Zebrix does.**\n\n\u003cbr/\u003e\n\n## How It Works\n\n```mermaid\nflowchart TD\n    API[\"NBA OFFICIAL API\u003cbr\u003eReferee Assignments\u003cbr\u003e(24h pre-game)\"] --\u003e|Scrape| Parser[\"CREW PARSER\u003cbr\u003eExtract ref names\u003cbr\u003eMatch to history\"]\n    \n    subgraph Engine [\"ZEBRIX STRATEGY ENGINE\"]\n        direction TB\n        DB[\"Ref Bias\u003cbr\u003eDatabase\u003cbr\u003e(6yr data)\"] --\u003e Signal[\"Signal Generator\u003cbr\u003eFair price calc\u003cbr\u003eEdge ≥ 6%?\"]\n        Signal --\u003e Risk[\"Risk Manager\u003cbr\u003e5% max/trade · 20% max exposure\"]\n    end\n    \n    Parser --\u003e Engine\n    Risk --\u003e|Execute| Polymarket[\"POLYMARKET CLOB\u003cbr\u003ePolygon · USDC.e Settlement\u003cbr\u003eDEGA Rank P\u0026L Tracking\"]\n```\n\n\u003cbr/\u003e\n\n## Architecture Deep Dive\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eData Pipeline\u003c/strong\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n| Stage | What | How |\n|---|---|---|\n| **1. Ingest** | Official NBA referee assignments | Scrape `official.nba.com` within minutes of publication |\n| **2. Enrich** | 6+ seasons of referee tendency data | Cross-reference Over%, Home Win%, fouls/game, point adjustment |\n| **3. Score** | Referee Adjustment Factor | Composite bias score per referee per market type |\n| **4. Signal** | Trade signals with confidence | Compare model fair price vs. Polymarket market price |\n| **5. Filter** | Risk management gates | Reject signals below 6% edge, apply position sizing |\n| **6. Execute** | CLOB limit orders | Polymarket API via Canon CLI strategy pipeline |\n| **7. Track** | Real-time P\u0026L | DEGA Rank integration for live performance monitoring |\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eReferee Tendency Database\u003c/strong\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\nSample data powering Zebrix's edge detection:\n\n| Referee | Over% | Home Win% | Avg Fouls/G | Point Adj | Signal Strength |\n|---|---|---|---|---|---|\n| Tony Brothers | 57.3% | 58.1% | 23.4 | +5.7 | 🔥🔥🔥 |\n| Scott Foster | 54.8% | 59.2% | 22.1 | +3.2 | 🔥🔥 |\n| Ed Malloy | 52.1% | 51.3% | 20.8 | +1.8 | 🔥 |\n| Marc Davis | 48.7% | 52.4% | 21.5 | -0.9 | ⚡ |\n| Zach Zarba | 46.2% | 48.9% | 19.7 | -2.1 | ⚡ |\n\n\u003csub\u003eData spans 2020–2026 regular season + playoffs. Updated monthly.\u003c/sub\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRisk Management\u003c/strong\u003e\u003c/summary\u003e\n\n\u003cbr/\u003e\n\n```\nPosition Sizing Rules:\n├── Max single trade:     5% of bankroll\n├── Max total exposure:   20% of bankroll\n├── Min edge threshold:   6% model-estimated\n├── Stop-loss:            -15% per position\n├── Confidence tiers:     A (≥9%), B (≥7%), C (≥6%)\n└── Kelly criterion:      Half-Kelly fractional sizing\n```\n\n\u003c/details\u003e\n\n\u003cbr/\u003e\n\n## Dashboard\n\nThe analytics dashboard provides real-time monitoring of referee assignments, active trade signals, and portfolio performance:\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/dashboard.png\" alt=\"Zebrix Dashboard\" width=\"100%\" /\u003e\n\u003c/p\u003e\n\n**Key views:**\n- **Referee Tendency Cards** — Live bias scores with historical trend sparklines\n- **Backtest Chart** — Cumulative P\u0026L across 6 seasons of historical data\n- **Trade Signal Panel** — Active + historical signals with confidence scoring\n- **Stats Grid** — 8-metric KPI bar (win rate, ROI, Sharpe, max drawdown, etc.)\n- **P\u0026L Tracker** — Full trade history with per-game breakdown\n\n\u003cbr/\u003e\n\n## Tech Stack\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eLayer\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eTechnology\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003ePurpose\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eDashboard\u003c/td\u003e\n\u003ctd\u003eNext.js 16, React 19\u003c/td\u003e\n\u003ctd\u003eAnalytics \u0026 monitoring UI\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eStyling\u003c/td\u003e\n\u003ctd\u003eTailwind CSS v4\u003c/td\u003e\n\u003ctd\u003eUtility-first responsive design\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eCharts\u003c/td\u003e\n\u003ctd\u003eRecharts\u003c/td\u003e\n\u003ctd\u003eP\u0026L curves, tendency sparklines\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eDatabase\u003c/td\u003e\n\u003ctd\u003eSupabase (PostgreSQL)\u003c/td\u003e\n\u003ctd\u003eReferee data, signals, trade history\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eTrading\u003c/td\u003e\n\u003ctd\u003eCanon CLI (DEGA)\u003c/td\u003e\n\u003ctd\u003eStrategy execution framework\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eMarket\u003c/td\u003e\n\u003ctd\u003ePolymarket CLOB API\u003c/td\u003e\n\u003ctd\u003eOrder placement \u0026 settlement\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eChain\u003c/td\u003e\n\u003ctd\u003ePolygon (USDC.e + POL)\u003c/td\u003e\n\u003ctd\u003eOn-chain settlement \u0026 gas\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eData\u003c/td\u003e\n\u003ctd\u003eNBA Official, BBRef\u003c/td\u003e\n\u003ctd\u003eReferee assignments \u0026 historical stats\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003eCI\u003c/td\u003e\n\u003ctd\u003eGitHub Actions\u003c/td\u003e\n\u003ctd\u003eNode 20/22/24 matrix testing\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr/\u003e\n\n## Quick Start\n\n### Prerequisites\n\n| Requirement | Version |\n|---|---|\n| Node.js | ≥ 20.9.0 |\n| npm | ≥ 10 |\n| Polymarket API | [Get credentials](https://docs.polymarket.com/#authentication) |\n| Polygon wallet | Funded with USDC.e |\n\n### Install \u0026 Run\n\n```bash\n# Clone\ngit clone https://github.com/edycutjong/zebrix.git\ncd zebrix\n\n# Configure\ncp .env.example .env.local\n# Fill in your API keys (see table below)\n\n# Install \u0026 launch\nnpm install\nnpm run dev\n```\n\n### Environment Variables\n\n| Variable | Source | Required |\n|---|---|---|\n| `NEXT_PUBLIC_SUPABASE_URL` | [Supabase Dashboard](https://supabase.com/dashboard) → Settings → API | ✅ |\n| `NEXT_PUBLIC_SUPABASE_ANON_KEY` | Same as above | ✅ |\n| `POLYMARKET_API_KEY` | [Polymarket Docs](https://docs.polymarket.com/#authentication) | ✅ |\n| `POLYGON_WALLET_PRIVATE_KEY` | Your Polygon wallet (MetaMask export) | ✅ |\n\n\u003cbr/\u003e\n\n## Testing \u0026 CI\n\n```bash\nnpm run lint          # ESLint\nnpm run typecheck     # TypeScript strict mode\nnpm run test          # Jest unit tests\nnpm run test:coverage # Coverage report (100% target)\nnpm run ci            # Full pipeline: lint + typecheck + test:coverage\n```\n\n\u003cp align=\"center\"\u003e\n  \u003ccode\u003eCI runs on every push/PR → Node.js 20 · 22 · 24 matrix\u003c/code\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\n## Project Structure\n\n```\nzebrix/\n├── .github/\n│   └── workflows/ci.yml        # GitHub Actions CI (3-node matrix)\n├── db/\n│   └── schema.sql               # Supabase schema (4 tables + RLS)\n├── docs/\n│   ├── readme-hero.png          # Hero banner\n│   ├── readme.png               # Dashboard screenshot\n│   └── youtube-thumbnail.png    # YouTube demo thumbnail\n├── public/\n│   ├── icon.svg                 # Brand icon (zebra Z + chart)\n│   └── og-image.png             # OG social card\n├── src/\n│   ├── app/\n│   │   ├── globals.css          # Tailwind v4 theme + design tokens\n│   │   ├── layout.tsx           # Root layout + SEO metadata\n│   │   └── page.tsx             # Main dashboard page\n│   ├── components/\n│   │   ├── BacktestChart.tsx    # Cumulative P\u0026L visualization\n│   │   ├── PLTracker.tsx        # Trade history + performance stats\n│   │   ├── RefereeTendencyCard.tsx  # Individual ref bias display\n│   │   ├── StatsGrid.tsx        # 8-metric KPI dashboard bar\n│   │   └── TradeSignalPanel.tsx # Active/historical signal feed\n│   └── lib/\n│       ├── canon/               # Canon CLI strategy interface stubs\n│       ├── constants.ts         # Colors, risk params, API URLs\n│       ├── mock-data.ts         # Deterministic test fixtures\n│       └── types.ts             # TypeScript interfaces\n├── .env.example                 # Template with all required vars\n├── AGENTS.md                    # AI agent instructions\n├── LICENSE                      # MIT\n└── package.json\n```\n\n\u003cbr/\u003e\n\n## Hackathon\n\n\u003ctable\u003e\n\u003ctr\u003e\n\u003ctd width=\"200\"\u003e\u003cstrong\u003eEvent\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cstrong\u003eDEGA NBA Playoffs Prediction Market Hackathon 2026\u003c/strong\u003e on DoraHacks\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eTrack\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003eInnovative (Open)\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eFramework\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003eCanon CLI (DEGA)\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eEdge\u003c/strong\u003e\u003c/td\u003e\n\u003ctd\u003eReferee assignment data as a systematically ignored alpha signal\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n### Judging Criteria\n\n| Weight | Criterion | How Zebrix Addresses It |\n|---|---|---|\n| **30%** | Utility / Profit | Backtested +18.7% ROI over 6 seasons of historical data |\n| **30%** | Technical Quality | Full CI/CD, 100% test coverage, TypeScript strict mode |\n| **25%** | Innovation | First referee-bias arbitrage bot on any prediction market |\n| **15%** | Presentation | Bloomberg-grade analytics dashboard + 4-minute demo |\n\n\u003cbr/\u003e\n\n## Demo\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://youtu.be/OkuA9sHAOOs\"\u003e\n    \u003cimg src=\"docs/youtube-thumbnail.png\" alt=\"Zebrix Demo Video\" width=\"100%\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003csub\u003e▶️ [Watch the full demo on YouTube](https://youtu.be/OkuA9sHAOOs)\u003c/sub\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\n## License\n\n[MIT](LICENSE) © 2026 [Edy Cu](https://github.com/edycutjong)\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003csub\u003eBuilt for the DEGA NBA Playoffs Prediction Market Hackathon 2026\u003c/sub\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedycutjong%2Fzebrix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedycutjong%2Fzebrix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedycutjong%2Fzebrix/lists"}