CLV Scout
You can win the bet and still be wrong. CLV Scout grades any pick against the closing line — pay 1¢ over OKX x402 on X Layer for a calibrated Sharp Score backed by a settled, recomputable truth table.
Videos




Tech Stack
Description
Inspiration
Every betting leaderboard ranks by profit — but profit is noisy and mostly luck over any small sample. The number that actually predicts a bettor's future edge is Closing Line Value (CLV): did you beat the market's final price? A tout can post "+12% last 5 picks" and still be a coin-flip. We wanted an agent that grades the bet, not the scoreboard, and proves it with a record you can recompute yourself.
What it does
1. *POST /api/grade — $0.01/call.** Grade one bet against its recorded closing line → clv_grade (A+…F), clv_pct, beat_close, and the settled truth-table row for that band.
2. *POST /api/audit — $0.20/call.** Feed up to 25 bets (or a tout's history) → beat-close rate, grade distribution, and an origin-disclosed Sharp Score (0–100) built from recomputable sub-scores. Turns "+12% ROI" into "40.7/100, only 1 of 5 beat the close."
3. *POST /api/calibration — free.** The live settled truth table (grade → n · win% · ROI) so anyone can audit the grades.
4. UNGRADED honesty path. No recorded closing line → it returns UNGRADED. It never invents a number to look smart.
How we built it
| Layer | Technology | Why |
|---|---|---|
| Runtime | TypeScript + Express (tsx) | Fast, typed, ships as tsx-run TS |
| Payments | OKX x402 viem, EIP-3009) | Native HTTP 402 metering; zero payment code in business logic |
| Chain | X Layer eip155:196, USD₮0 | Zero-gas stablecoin settlement via the OKX Facilitator |
| Validation | zod | Strict request/response schemas |
| Data | Settled seed ledger (24 rows) | Deterministic, recomputable grades |
Quality & Security Engineering
| Layer | Status | Detail |
|---|---|---|
| Code Quality | ✅ | ESLint + strict TypeScript, zero warnings |
| Unit Testing | ✅ | 124 vitest tests + coverage gate |
| E2E / Smoke | ✅ | CI Stage 4 boots the API and self-checks 402/402/405/200 |
| Security | ✅ | TruffleHog secret scan + npm audit + license-checker |
| CI/CD | ✅ | 5-stage pipeline, Node 20 / 22 / 24 matrix, deploy gate |
| Perf & Observability | ✅ | /health check + Railway restart policy |
Challenges we ran into
1. Browsers can't sign EIP-3009. The proof page signs the payment server-side with a throwaway key — the identical path to npm run buyer — so the demo round-trips a real 402 challenge → paid replay → HTTP 200.
2. Deterministic money-shot. Grades had to be recomputable, not vibes: we seeded a 24-row settled ledger so "+12% raw ROI → Sharp Score 40.7, 1 of 5 beat the close" is reproducible every run.
3. Deploy native-build + self-fetch traps. Pinned Node 20 for the Railway build, fixed an IPv6 self-fetch ::1 vs 0.0.0.0), and removed a placeholder payTo that 500'd the live paid path.
What we learned
Refusing to answer is a feature. The UNGRADED path — and the disclosed, recomputable Sharp Score — is what makes the grade trustworthy; a predict-only bot can't offer that.
What's next
- Wire a real X Layer receive address to record on-chain settled receipts (currently burn-default).
- Live odds ingestion for continuous closing-line capture across more books.
- A public tout-leaderboard ranked by Sharp Score, not ROI.
Progress During Hackathon
Built from scratch during the event: the x402-metered /api/grade + /api/audit + free /api/calibration endpoints, the Sharp Score engine and settled truth table, the UNGRADED honesty path, and the live proof page. Wired to OKX x402 on X Layer @okxweb3 facilitator path), added a 5-stage CI pipeline (Node 20/22/24), and deployed the API + landing live on custom domains. 124 tests green.
Fundraising Status
Bootstrapped — not raising. Built solo for the hackathon; deployed and live.