{"id":51984930,"url":"https://github.com/smohamedjavid/the-pit","last_synced_at":"2026-07-30T18:01:02.303Z","repository":{"id":372247183,"uuid":"1305966774","full_name":"smohamedjavid/the-pit","owner":"smohamedjavid","description":"Rival AI pundits predict football on the record — picks sealed on-chain before kickoff, graded trustlessly against TxLINE, broadcast like a fight night. TxODDS World Cup hackathon.","archived":false,"fork":false,"pushed_at":"2026-07-19T22:28:59.000Z","size":185,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-20T00:19:02.655Z","etag":null,"topics":["ai-agents","commit-reveal","hackathon","solana","trading","txline","txodds","world-cup"],"latest_commit_sha":null,"homepage":"https://the-pit-pi-five.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/smohamedjavid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"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":null,"dco":null,"cla":null}},"created_at":"2026-07-19T19:14:09.000Z","updated_at":"2026-07-19T22:29:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/smohamedjavid/the-pit","commit_stats":null,"previous_names":["smohamedjavid/the-pit"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/smohamedjavid/the-pit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smohamedjavid%2Fthe-pit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smohamedjavid%2Fthe-pit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smohamedjavid%2Fthe-pit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smohamedjavid%2Fthe-pit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smohamedjavid","download_url":"https://codeload.github.com/smohamedjavid/the-pit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smohamedjavid%2Fthe-pit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36086552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-30T02:00:05.956Z","response_time":106,"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":["ai-agents","commit-reveal","hackathon","solana","trading","txline","txodds","world-cup"],"created_at":"2026-07-30T18:01:01.193Z","updated_at":"2026-07-30T18:01:02.295Z","avatar_url":"https://github.com/smohamedjavid.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# THE PIT\n\nThree rival AI pundits predict football on the record: every pick is sealed on-chain before its deadline, revealed after full-time, and graded against TxLINE data. The broadcast looks like a fight night because that is what punditry deserves — but the product is the registry underneath, which makes hiding a bad call impossible.\n\nSolana devnet only. No money moves; the stake is reputation.\n\nLive broadcast: **https://the-pit-pi-five.vercel.app** (alias:\n[the-pit-club.vercel.app](https://the-pit-club.vercel.app)). Architecture and\ntrust-model deep-dive: [TECHNICAL.md](TECHNICAL.md).\n\n## The fight bill\n\nThree personas, three genuinely different engines over the same TxLINE odds feed:\n\n- **THE STEAMER** (momentum) — measures how the de-margined 1X2 probabilities moved over the last six hours of trading and backs the side the money is walking toward.\n- **THE QUANT** (value) — fits two Poisson goal rates from the Asian-handicap ladder (supremacy = the line that prices closest to even) and the primary totals line, derives model 1X2 probabilities, and backs the side the market underprices most.\n- **THE HEEL** (contrarian) — finds the biggest public move on the board and takes the side the crowd deserted.\n\nEach round, every persona files a full pick-slip for one fixture — match winner, total goals over/under, and a \"goal after the 75th minute\" prop — with an honest probability on each leg. Slips are canonical JSON; their keccak256 hash is committed on-chain before the deadline; after full-time the payload is revealed and graded leg by leg (HIT / MISS / NO ACTION), with a Brier score over the claimed probabilities so confidence is graded, not just direction.\n\nThe engines are pure functions of the pre-kickoff odds book. Same archived book in, same slip out — which is what makes a sealed hash meaningful.\n\n## How sealing works\n\nThe registry is a small Anchor program (`program/`, deployed on devnet as [`8GcrsgwxH4p4DzdBimyApwMex1DRwve8j3XiMWN9WbaD`](https://explorer.solana.com/address/8GcrsgwxH4p4DzdBimyApwMex1DRwve8j3XiMWN9WbaD?cluster=devnet)) with three instructions:\n\n1. `register_strategy` — records keccak256 of the persona's parameter string, its window, and a cadence promise (slips per day). The program requires registration to happen **before** the window opens; parameters are frozen from then on.\n2. `commit_signal` — stores a 32-byte payload hash, the fixture id, and an event deadline. The program rejects any commit at or past its deadline; `committed_at` comes from the chain's clock.\n3. `reveal_signal` — takes the payload bytes, recomputes keccak256 **on-chain**, and rejects a mismatch. A commitment can never be edited or deleted.\n\nWhy hiding calls is impossible: a bad pick can only stay sealed, and the cadence promise makes that visible — anyone can count commitments per day against the promise recorded at registration. Silence is data. The pick-slips carry a random salt, so an unrevealed hash cannot be brute-forced from the small space of possible picks.\n\n## Trust model\n\nEnforced by the program:\n\n- picks are sealed before their deadline (chain clock, not ours)\n- a revealed payload is byte-identical to what was sealed\n- parameters and cadence promises are frozen before the window opens\n- nothing is deletable\n\nNot enforced, stated plainly:\n\n- **computation integrity** — the engines run off-chain; you can re-run them from an archived odds book, but the program cannot attest they ran as published. TEE attestation is the roadmap answer.\n- **Sybil strategies** — nothing stops someone registering ten personas and promoting the lucky one. Mitigation is social and structural: registration is public, cadence promises are public, and abandoned siblings stay visible forever.\n- **grading inputs** — grades come from TxLINE score records (or, where devnet has already dropped a finished fixture's stats, from the market's own closing prints, labelled as such). The grade is recomputable from archived data, not oracle-attested.\n- **replay rounds are demonstrations** — devnet's World Cup ends this weekend, so two rounds replay recent fixtures and are labelled REPLAY everywhere. Their on-chain `committed_at` timestamps honestly show they were sealed after those matches ended. Only the main event — the final — was sealed before its own kickoff, about twenty hours before.\n\n## Judge path\n\n```\nnpm install\nnpx tsx scripts/verify.ts        # no env, no credentials, public devnet RPC\n```\n\nThe verifier enumerates every Strategy and Commitment account on the program, decodes the raw bytes with Anchor's BorshCoder, recomputes keccak256 for every payload published in `broadcast/data/rounds.json` against the on-chain hashes, checks parameter-hash preimages, audits cadence promised-vs-delivered, and prints a PASS/FAIL table. `RPC=\u003curl\u003e` overrides the endpoint if the public one rate-limits.\n\nThe pundits' registry accounts (account links only — devnet purges transaction history within days, so raw tx JSON is archived in `evidence/tx/`):\n\n| persona | strategy account |\n| --- | --- |\n| The Steamer | [`maWf2iyHuZTDTjnBzYXeAcHvikAgngzdU1YoL6E3eKk`](https://explorer.solana.com/address/maWf2iyHuZTDTjnBzYXeAcHvikAgngzdU1YoL6E3eKk?cluster=devnet) |\n| The Quant | [`DjMsvs377wrK8ipA1HJWn65W3sjvNGKoiwgRS61wVJXu`](https://explorer.solana.com/address/DjMsvs377wrK8ipA1HJWn65W3sjvNGKoiwgRS61wVJXu?cluster=devnet) |\n| The Heel | [`Hd7UsYe6rBh7Z75tfUyKnhrckoj5FS7fNp2EV8AJhuqn`](https://explorer.solana.com/address/Hd7UsYe6rBh7Z75tfUyKnhrckoj5FS7fNp2EV8AJhuqn?cluster=devnet) |\n\nThe main event's sealed commitments (Spain v Argentina, fixture 18257739): [Steamer](https://explorer.solana.com/address/7MU6sVRMwgJQz1afbzKniqtk7wP1fLyjy9hEDTnTMnda?cluster=devnet) · [Quant](https://explorer.solana.com/address/7jLp38qP7KuuZK139NUDCHC1ce2EdPiXR5ZoS9eqhMCp?cluster=devnet) · [Heel](https://explorer.solana.com/address/FwFHY8zD3SiH9hYohw6yUFPnR1kYQpXRuiyuyY6wYxbS?cluster=devnet).\n\n## Pre-season\n\nThe program was not deployed for this weekend. Two earlier strategies have been committing odds-dislocation signals to the same registry since July 3 — 76 commitments at the time of writing, still running:\n\n- [`EARHG2kzHmn7SqSMLGUBALLKH9rR6cw8qhNh9uZC5w4d`](https://explorer.solana.com/address/EARHG2kzHmn7SqSMLGUBALLKH9rR6cw8qhNh9uZC5w4d?cluster=devnet) (strategy #0, 37 commitments)\n- [`484ihPPgZPyLuoARcjHKDACEMx2yiQyXVbXYtvFx7TZY`](https://explorer.solana.com/address/484ihPPgZPyLuoARcjHKDACEMx2yiQyXVbXYtvFx7TZY?cluster=devnet) (strategy #1, 39 commitments)\n\nThe verifier lists them as hash-only entries (their payloads live in the project they came from) — including their cadence deficits, because the meter applies to everyone. The mechanics being judged tonight have run in public for two weeks.\n\n## Architecture\n\n```\nprogram/     Anchor commit/reveal registry (carried over unchanged; devnet)\ncorner/      the three persona engines + CLI\n             slip → canonical JSON → keccak → commit; reveal → grade → feed\nbroadcast/   Next.js fight-night surface (bill, board, verify) + JSON APIs\nscripts/     verify.ts (judge path) · archive-tx.ts (evidence snapshots)\nevidence/    registration/commit/reveal records + archived tx JSON\ntest/        vitest: canonicalisation, hashing, grading, engines, decode path\n```\n\nData flow: `corner` fetches TxLINE odds/scores (StablePrice feed, devnet), runs the engines, seals hashes on-chain, and writes the public feed (`broadcast/data/*.json`) — slips appear there only after their on-chain reveal. The broadcast reads that feed plus the chain itself: the KNOWS BALL board decodes Strategy/Commitment accounts live via RPC. Raw TxLINE feed captures stay out of the repo (their terms prohibit redistribution); everything derived — slips, hashes, grades, talk lines — is committed.\n\nThe trash-talk is deterministic template packs per persona, seeded by event identity (same event, same line, any machine). If `ANTHROPIC_API_KEY` is present the corner can run an optional polish pass; the feed labels which mode produced it. It degrades to pure templates without the key.\n\n## Running it\n\n```\n# corner (needs TxLINE credentials for slip building; see corner/src/txline.ts)\nnpx tsx corner/src/cli.ts status\nnpx tsx corner/src/cli.ts slip --fixture \u003cid\u003e --round \u003clabel\u003e\nnpx tsx corner/src/cli.ts commit --fixture \u003cid\u003e\nnpx tsx corner/src/cli.ts watch --fixture \u003cid\u003e     # capture scores, reveal+grade at FT\nnpx tsx corner/src/cli.ts build-feed\n\n# broadcast\ncd broadcast \u0026\u0026 npm install \u0026\u0026 npm run dev\n\n# tests\nnpm test\n```\n\nThe program is already deployed; `program/` builds with Anchor 0.32 if you want to reproduce it. Program tests live in `program/program-tests` (a separate cargo workspace so dev-dependencies don't poison the SBF build) and run the real `.so` via `SBF_OUT_DIR`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmohamedjavid%2Fthe-pit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmohamedjavid%2Fthe-pit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmohamedjavid%2Fthe-pit/lists"}