I built FactRush: A competitive fact-checking game where AI validators debate truth
Think Kahoot meets blockchain meets AI consensus
The twist? Verification isn't done by one sourceโit's battle-tested by multiple LLMs voting in real-time
๐ฎ Play it live | ๐ป GitHub
๐งต Here's how it works ๐
1/ THE PROBLEM ๐ค
Misinformation spreads faster than fact-checks
Traditional fact-checking:
โ Slow (hours/days)
โ Centralized (trust one source)
โ Boring (no incentive to verify)
What if we could make verification instant, decentralized, AND fun?
2/ THE SOLUTION โก
FactRush = Competitive game where players submit factual claims
But here's where it gets wild:
Verification happens via @GenLayer's "Intelligent Contracts"โsmart contracts that can:
โข Query LLMs (GPT-4, Claude, Llama)
โข Search the web
โข Reach consensus
3/ HOW IT WORKS ๐
When you submit a claim like "Bitcoin was created in 2009":
1๏ธโฃ Claim goes to GenLayer's Intelligent Contract
2๏ธโฃ Contract spawns 3-5 AI validators
3๏ธโฃ Each validator independently:
- Searches the web
- Analyzes evidence
- Votes VERIFIED/FALSE/UNCERTAIN
4/ THE MAGIC: OPTIMISTIC DEMOCRACY ๐ณ๏ธ
Validators don't just voteโthey provide reasoning + sources
The contract calculates consensus:
โข 3/3 agree = HIGH confidence verdict
โข 2/3 split = UNCERTAIN (nuance matters!)
โข Disputes trigger EXPANDED consensus (5 validators)
Democracy, but for facts โ๏ธ
5/ GAME FLOW ๐ฏ
ROUND 1: SUBMISSION (5 min)
Players race to submit claims across categories:
โข Tech News ๐ป
โข Science ๐ฌ
โข History ๐
โข Crypto/Web3 โ๏ธ
Bots powered by 500+ fact database compete too
6/ ROUND 2: VERIFICATION ๐ค
Watch in real-time as validators deliberate:
[Visual: Orbital animation showing 3 AI nodes]
Claude: "VERIFIED - multiple sources confirm"
GPT-4: "VERIFIED - dates align with records"
Llama: "UNCERTAIN - need more context"
Consensus: VERIFIED (67% confidence)
7/ ROUND 3: DISPUTE ARENA โ๏ธ
Think a verdict is wrong?
Stake points to challenge it
โ Triggers expanded consensus (5 validators)
โ Win = 1.5x claim points
โ Lose = forfeit stake
Game theory meets fact-checking
8/ THE TECH STACK ๐ ๏ธ
Frontend:
โข React + Vite
โข Zustand (state)
โข TailwindCSS + Framer Motion
โข Vercel Edge Functions
Backend:
โข GenLayer Intelligent Contracts (Python)
โข genlayer-js SDK
โข Optimistic Democracy consensus
9/ WHY THIS MATTERS ๐ก
This isn't just a gameโit's a proof of concept:
What if:
โข News articles were verified this way?
โข Social media claims auto-checked?
โข Misinformation flagged in real-time?
AI consensus > single source
Transparent > black box
10/ THE INNOVATION ๐
Traditional smart contracts = deterministic code
GenLayer's Intelligent Contracts = non-deterministic AI
They can:
โ
Make subjective judgments
โ
Query external APIs
โ
Reach consensus on "fuzzy" truth
โ
Explain their reasoning
11/ CHALLENGES & SOLUTIONS ๐ง
Building this taught me:
Problem: Private keys in frontend = security nightmare
Solution: Vercel Edge Functions proxy writes, reads are direct
Problem: Localhost โ Vercel = unreachable
Solution: Deploy to GenLayer Studio Network
Problem: Fact diversity
Solution: 500+ curated facts across 5 categories
12/ ARCHITECTURE DIAGRAM ๐
BROWSER VERCEL EDGE GENLAYER
โ โ โ
โโ Submit Claim โโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โ โ (signs with key) โ
โ โ โ
โโ Verify โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โ โ โโโโโ Claude โ
โ โ โโโโโ GPT-4 โ
โ โโโโโโโโโโโโ Votes โโโโโโโผโโโโโโค Llama โ
โ โ โโโโโ Gemini โ
โ โ โ
โโ Read Results โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ (direct, no key) โ
Deep Dive: Intelligent Contracts
What Makes Them "Intelligent"?
Traditional smart contracts are deterministic: same input = same output, always.
GenLayer's Intelligent Contracts are non-deterministic: they can make subjective judgments by querying LLMs and reaching consensus.
Here's the actual contract code:
from genlayer import *
import json
class FactVerificator(gl.Contract):
def __init__(self, game_id: str, category: str, difficulty: str):
self.game_id = game_id
self.category = category
self.difficulty = difficulty
self.claims = {} # TreeMap[str, str]
@gl.public.write
def verify_claim(self, claim_id: str) -> None:
"""
Verify a claim using multiple AI validators
Each validator independently searches and analyzes
"""
claim = json.loads(self.claims[claim_id])
# Build prompt for validators
prompt = f"""
You are a fact-checking validator in: {self.category}
Claim: "{claim['content']}"
Difficulty: {self.difficulty}
Task:
1. Search the web for credible sources
2. Analyze evidence
3. Return verdict as JSON
Format:
{{
"verdict": "VERIFIED" | "FALSE" | "UNCERTAIN",
"confidence": 0-100,
"reasoning": "Brief explanation",
"sources": ["url1", "url2"]
}}
"""
# Leader/Validator consensus pattern
def leader_fn():
result = gl.nondet.exec_prompt(prompt)
return json.loads(extract_json(result))
def validator_fn(leader_res: gl.vm.Result) -> bool:
if not isinstance(leader_res, gl.vm.Return):
return False
leader_verdict = leader_res.calldata
validator_verdict = leader_fn()
# Validators must agree on verdict
if leader_verdict["verdict"] != validator_verdict["verdict"]:
return False
# Allow 20% confidence difference
confidence_diff = abs(
leader_verdict["confidence"] -
validator_verdict["confidence"]
)
return confidence_diff <= 20
# Run non-deterministic consensus
result = gl.vm.run_nondet(leader_fn, validator_fn)
# Update claim with consensus result
claim["status"] = result["verdict"]
claim["confidence"] = result["confidence"]
claim["reasoning"].append(result["reasoning"])
claim["sources"].extend(result["sources"])
self.claims[claim_id] = json.dumps(claim)
How Consensus Works
Leader Election: One validator proposes a verdict
Validation Round: Other validators independently verify
Agreement Check: Validators must agree on verdict ยฑ confidence threshold
Finalization: Consensus result is written to blockchain
This is Optimistic Democracyโvalidators are assumed honest unless proven otherwise.
13/ BUILT IN PUBLIC ๐๏ธ
Entire stack is live:
๐ฎ Play: https://fact-rush.vercel.app
๐ป Code: https://github.com/Drk-codey/FactRush
๐ Docs: Built on GenLayer
Tech:
โข React, Vite, Tailwind
โข GenLayer SDK (genlayer-js)
โข Intelligent Contracts (Python)
14/ WHAT'S NEXT? ๐ฎ
Phase 2 Ideas:
โข Real-time multiplayer (Supabase Realtime)
โข NFT badges for top verifiers
โข Category tournaments
โข Community-submitted facts
โข Integration with news APIs
The future of fact-checking is decentralized, transparent, and gamified
15/ TRY IT YOURSELF ๐ฎ
Play FactRush:
https://fact-rush.vercel.app
Compete against AI bots
Challenge verdicts
Climb the leaderboard
And most importantly:
Learn to think critically about truth in the age of AI
16/ LESSONS LEARNED ๐
- AI consensus > single AI judgment
- Transparency builds trust (show reasoning)
- Gamification drives engagement
- Blockchain + AI = powerful combo
- Edge functions solve auth problems elegantly
Building in public = best way to learn
17/ SHOUTOUT ๐
Huge thanks to @GenLayer for building Intelligent Contracts
This wouldn't be possible without:
โข Optimistic Democracy consensus
โข Web search in smart contracts
โข Non-deterministic execution
โข Transparent validator reasoning
The future is wild ๐
18/ FINAL THOUGHTS ๐ญ
FactRush proves AI consensus can verify truth transparently
Imagine:
โข Wikipedia with AI validators
โข Twitter Community Notes on steroids
โข Decentralized fact-checking networks
The tools exist
The time is now
Let's build it
Want to learn more?
๐ Full technical writeup: [Link to Dev.to]
๐ฎ Play the game: https://fact-rush.vercel.app
๐ฌ DM me with questions
RT if this is cool! ๐
Web3 #AI #GenLayer #FactChecking #BuildInPublic #Blockchain #React #GameDev
P.S. The leaderboard is live and bots are ruthless ๐ค
Can you outsmart Claude, GPT-4, and Llama?
Only one way to find out ๐
Top comments (0)