Inspiration
Online poker rewards whoever plays the most, and almost nothing helps you actually get better. We wanted a poker room that ranks you fairly, can prove it isn't cheating you, and teaches you after every session. Bet on the Horns is ranked Texas Hold'em where your skill rating lives on Solana and an AI coach reviews your decisions.
What it does
Bet on the Horns is a ranked Texas Hold'em site with three formats: Heads Up, SNG 4 and SNG 6.
- Ranked play with on-chain Elo. Each format keeps its own Elo. When a table starts, part of each player's rating is locked in an escrow on Solana, and it's settled on-chain when the game ends. Beating a higher-rated player is worth more.
- Provably fair dealing. Before the first card is dealt, the server commits a hash of the shuffle seed. When the match ends, the seed is revealed, so anyone can check that every deck was fixed in advance.
- Rank dNFT badges. Your Elo earns a rank (Bronze, Silver, Gold, Diamond, Platinum), shown as a poker-chip badge. Achievement badges for hands played and wins are claimable on-chain, and you choose which ones appear on your public profile.
- Wallet sign-in. You sign one free message with your Solana wallet; no transaction or account is needed.
- Practice vs AI. Unranked tables against three AI personalities (The Shark, The Maniac, The Rock). They mirror your own play style and adapt to your rating.
- Post-game analysis. After a game, one click gives you a grade, your strengths and leaks, and the three most important hands: what you did, the better play, and why, with pot odds, equity and outs.
- AI coach. A chat coach for rules, strategy and hand reviews, with live web search. It switches off during ranked games.
- Daily puzzles. Five math-checked poker decisions a day, with streaks and a daily leaderboard.
- Profiles and leaderboards. An Elo-over-time graph per format, match history with the on-chain transactions, and leaderboards per format.
- Poker news. A live news page.
How we built it
- Frontend: React, TypeScript and Vite, with Framer Motion and GSAP animations. Designed and built with Grok and Cursor for the game backend and integrations.
- Game server: a TypeScript Express server with our own Hold'em engine (betting rounds, side pots, all-in run-outs, hand evaluation), deployed serverless on Vercel at betonthehorns.tech.
- Solana: two Anchor programs on devnet.
elo_escrowlocks rating stakes and settles results;achievementsrecords hands, wins and rank dNFTs. - Realtime: Ably carries live table updates, the matchmaking queue and presence.
- Database: TigerData (TimescaleDB) stores live game state, matches, Elo history (as hypertables), hand histories, puzzle results and the matchmaking queue.
- AI on Snowflake: Snowflake Cortex runs the practice opponents, and Snowflake stores each player's play-style stats so the AIs can mirror them. The post-game analysis also runs on Cortex. Our own evaluator gives the model each hand's exact made hands, draws and outs, so it never has to guess them.
- Muse: Meta's Muse powers the in-app coach chat.
- SerpApi: SerpApi supplies the poker news feed and the coach's web search.
Challenges we ran into
- Running a real-time card game on serverless. Vercel functions freeze between requests, so nothing can live in memory. We moved every table's state into the database: each move takes a row lock, applies, and saves, so any instance can carry a game forward.
- Duplicate and ghost games. Several servers sharing one database and realtime app were each creating their own copy of a game. We fixed it with a database rule allowing one live game per wallet, versioned realtime channels, and queueing only when a player actually presses queue.
- Cold starts. When many instances start at once, they raced each other setting up the database. A setup lock that releases itself if an instance freezes, plus a schema version check, fixed it.
- Getting the end of a game right. Elo settlement, hand history and seat release must happen exactly once, even if an instance freezes mid-way. We split that work into steps that are safe to repeat and steps guarded to run once.
- Keeping the AI honest about cards. The model sometimes misread hands, for example calling a pair a straight. Feeding it the evaluator's made hands and draw outs fixed that.
Accomplishments that we're proud of
- A full ranked poker loop on Solana: escrowed Elo at the start of a game, on-chain settlement at the end, and a seed reveal anyone can verify.
- Post-game analysis that reads like a real coach: specific hands, real math, and one thing to work on.
- AI opponents that learn from your own play style.
- Live multiplayer that survives refreshes, disconnects and serverless instances. You can leave mid-game and rejoin the same table within 5 minutes.
- A cohesive, polished design across every page, from the landing page to the rank chips.
What we learned
- Serverless and real-time games pull in opposite directions; the database has to be the single source of truth.
- Making the "end of a game" step correct is harder than playing the game itself.
- LLMs explain poker well once the facts (cards, hands, outs) are computed for them.
- Anchor makes Solana programs approachable, and devnet let us iterate on escrow and settlement quickly.
What's next for BetontheHorns
- Moving from devnet to mainnet, with transferable rank dNFTs.
- Tournaments and private tables with friends.
- A dedicated game server for lower latency, keeping Vercel for the site.
- Hand-history replays you can step through, linked to the analysis.
- Mobile-first table controls and a spectator mode.
Video Drive Link (if you cannot watch demo)
https://drive.google.com/file/d/1Y4srDnWoqXJhYKEKL2tPcvyG1BSi2uha/view?usp=drive_link
Github Repo
Built With
- ably
- anchor
- css3
- html5
- javascript
- rust
- snowflake
- solana
- tailwindcss
- tigerdata
- typescript
Log in or sign up for Devpost to join the conversation.