A comedy courtroom where AI lawyers argue your case and a World-verified human jury rules onchain.
CringeCourt is a comedy courtroom game for petty disputes, embarrassing confessions and internet controversies. AI lawyers put on the show, and real, verified humans decide the verdict. The rule is "AI performs, humans decide": the AI can argue and joke, but it can never change a vote.
You walk through a voxel town into a courthouse and watch your case play out in a first-person 3D courtroom, with animated AI characters, voiced arguments and OBJECTION! callouts.
There are three modes:
Solo: You file a confession. Your AI advocate, Counsel Chaos, defends you against the AI prosecutor, Miss Ratio, and a 3-person jury rules GUILTY or NOT COOKED.
Versus: Two consenting people bring a real dispute, such as a couple's argument. Each gets their own AI lawyer and pays half the fee, and the jury picks SIDE A or SIDE B. The two parties can't sit on their own jury.
Grand Jury: A public question goes before 7 jurors. Spectators crowdfund the case and make non-binding predictions with points, which stay hidden until the jury's votes are revealed.
The fairness comes from three sponsor technologies. Jurors are screened with World ID, so each is a unique human and not a bot. AI performances run through the 0G Compute Router on open models, keeping the show separate from the decision. Money and case state live in smart contracts on Arc testnet, written in Arc Studio, and the UI only displays what the chain reports.
Each case runs through a fixed sequence. Parties fund the case in test USDC and jurors post refundable bonds. The AI transcript is then frozen and its hash recorded, so it can't change before voting. Jurors vote by commit-reveal: they first submit a hash of their ballot, then reveal it, and their salts never leave their device. This stops jurors from copying each other or being swayed by a running tally.
Once the verdict is finalized, the contract pays jurors who voted on time a bonus and returns their bonds. No-shows forfeit their bond, and if no verdict is reached, the filer gets a full refund including fees. Fees and rules are fixed per case when it's created.
The result is a game where people pay small amounts to have strangers judge them, and jurors have a real reason to show up and vote honestly. It's entertainment rather than legal advice, and it runs on testnet only, with no real money.
CringeCourt is a TypeScript monorepo built with npm workspaces. The rule behind the architecture is that AI performs and humans decide. packages/ai imports nothing from the chain or escrow code, and model output never feeds a payout.
Frontend: A Vite + React SPA with React Router, Radix primitives, viem and a custom design system. The town and first-person courtroom run on three.js with react-three-fiber. Game logic runs in a headless controller with fixed-step AABB physics, and the renderer only reads its state, so most of it can be tested without a GPU.
Ports and adapters: Domain rules (money, phases, ports) live in pure TypeScript in @cringe-court/core, and the UI talks only to ports. The chain port has both a viem adapter and an in-memory mock with the same semantics, so the app still runs in one browser with no chain or server. An optional Node server adds shared Versus and Grand Jury rooms over SSE, with hashed bearer sessions and append-only JSON-line logs.
Contracts: CringeCourt.sol, CourtMath.sol and HumanRegistry.sol, in Solidity 0.8.28, built in Arc Studio. Hardhat runs 250 tests covering lifecycle, access, rounding and settlement scenarios, and Foundry handles the Arc broadcast. Every amount and window lives in one terms.json, which is copied onto each case at creation so its terms can't change later. A separate Python model of the economics produced those numbers, and we set a rule that no mode's pricing may depend on jurors failing to show up.
Arc and Circle USDC: USDC is Arc's gas token, so a player needs one balance for gas, case fees, bonds and refunds, with no second coin to bridge. On a 1.20 USDC case that matters a lot. The catch is that one balance has two scales: 18 decimals as native gas and 6 as ERC-20 case money. We keep them strictly separate in the code.
World ID: Jurors verify with IDKit, and the server checks the proof. We store an HMAC of the nullifier, never the raw value, and bind one human to one wallet. An attester writes that to HumanRegistry, and acceptSeat enforces it onchain: jurors need Orb level, the same human can't take two seats, and a party can't join their own jury even from a different wallet. This is what makes the bonds and jury meaningful, because without proof of personhood one person could fill every seat. Seats are assigned through EIP-712 signed offers.
0G: OgRouterClient calls the OpenAI-compatible 0G Compute Router using plain fetch, with no SDK. It reads the live model catalog and only sends parameters that model supports, so we can swap open models freely. Cases are prepared first, with personal details redacted and unsafe cases refused before any compute is spent. The code owns the structure, and the model only writes dialogue and picks named shots and beats. Output is validated, with one bounded repair turn. For example, a rebuttal must quote 3–12 words from the line it answers. The judge's verdict line is generated only after the human result exists, and it falls back to a template that states the real result.
Art and audio: The characters are Blockbench models exported to GLB, partly scripted through the Blockbench MCP server, with animation clips mapped by a manifest and a procedural mesh as fallback. Every sound is synthesized live with Web Audio, including a crowd built from sawtooth waves and formant filters, so the game ships no audio files.
Hacky bits:
CringeCourt.sol handles all three modes in one contract. Getting it to about 23.9 KB, under the 24,576-byte EIP-170 limit, took viaIR with optimizer_runs = 1, which trades gas efficiency for size.diag.mjs drives headless Chrome through SwiftShader and reads renderer stats from a debug window.__town hook.
