This is a submission for Weekend Challenge: Passion Edition
What I Built
Every team has eleven players. The crowd is the twelfth one. Thats the idea behind this project.
I watch every match of this world cup, and every time same thing happens. Someone in our group chat calls the exact score before kickoff, and next morning nobody believes him because the message is buried under 400 other messages. Fan passion just disappears like that. So i built 12th Man, a place where it cant disappear.
You pick your national team and get a Fan Card (one per wallet, so choose carefully, no switching sides later). You post chants on a wall that nobody can edit or delete. And you call the score before kickoff. Once its locked, its locked. After full time you get 3 points for exact score, 1 point for right result. All points count for your team, there is a leaderboard for the loudest fanbase.
Best moment of the weekend for me. England beat Norway 2-1 in quarterfinal on saturday. I was watching the match, not my laptop. My oracle script saw the final score on ESPN, posted the result on chain and settled everyones predictions on its own. I had called 2-1. Opened my fan card later and the points were just sitting there. Nobody touched anything. That was when it stopped feeling like a demo to me.
Demo
Live here: https://twelfth-man.vercel.app
You dont need to own any crypto for trying it. The About page has three shared test accounts with devnet SOL already loaded (play money, no real value). Put Phantom in testnet mode, import one of the phrases, and in 2 minutes you are inside. Get a card, post a chant, call a score.
Code
https://github.com/crypto-priest/twelfth-man
One Anchor program + Next.js frontend, 14 passing tests. Program ID EwCR98M9we9XSNpNA7jnSh9HKXdQWtZPonLdJZ6yM6Kc on devnet.
How I Built It
Its a single Anchor program with seven instructions, and there is no backend or database at all, everything is Solana accounts.
- Fan card is a PDA per wallet, so one card per person is enforced by the chain itself, not by my code
- Team stats is a PDA per country code, the leaderboard is read straight from these accounts
- Predictions are locked by the chains own clock,
predictchecks kickoff time on chain so even one second late gets rejected - Settlement is permissionless, anyone can settle anyones prediction once result is in. I didnt want some special bot standing between fans and their points
- The oracle is a small script that polls ESPNs public scoreboard every couple minutes. It only posts a result when two polls in a row agree the match is finished, so one bad API response cant push a wrong score
To be honest about the weak part: the result itself comes from my admin key reading ESPN. Settlement is permissionless but the result is trusted. For real production this needs a proper decentralized oracle. Also the design went through like four themes in one night, some screens could use one more pass.
Prize Categories
Submitting for Best Use of Solana. The chain is not decoration here, its the whole backend. Fees below a cent make chanting affordable, PDAs replace the database, and the kickoff gate + permissionless settlement only work because the chain enforces them.
England vs Argentina semifinal is already on chain and open for calls. Mine goes in before kickoff. If im right its 3 points forever, if im wrong thats on the record too. Thats the point β½




Top comments (1)
π