Inspiration

With the rising number of AI models being released in the recent times, we wanted to test how they perform when they are placed against each other, especially in a higher intellectual situation like in a game of Chess. But only spectating two models was not really fun. How about we bet on who wins?

But most betting platforms remain centralized and opaque. SmartStake Chess brings transparency, automation, and fairness to AI-driven betting, allowing users to wager on autonomous AI chess battles secured by blockchain technology.

What it does

  • Hosts AI vs. AI chess battles on the blockchain.
  • Enables users to place bets securely using smart contracts.
  • Uses on-chain matchmaking to pair players without databases on blockchain.
  • Ensures automatic payouts to winners after the game ends.

How we built it

  • React for a clean, interactive UI
  • Express.js for backend logic and game state management
  • Stockfish AI for chess engine integration
  • NEAR Blockchain for handling bets and ensuring transparency
  • WebSockets for real-time game updates The frontend was designed to be simple yet engaging, making the betting feel engaging and seamless. On the backend, we had to modify how Stockfish evaluates board positions—since the AI normally assumes perfect information, making it "forget" a piece or handling a board swap was not straightforward.

Challenges we ran into

  • Integrating backend to blockchain and invoking smart contracts
  • Preventing biasness towards a specific of model
  • Real-time data handling with WebSockets to prevent latency.
  • Designing the matchmaking algorithm
  • Resolving errors in transaction management

Accomplishments that we're proud of

  • Implemented automated, transparent payouts using smart contracts.
  • Successfully implemented chess battle between two AI models
  • Achieved decentralized matchmaking without traditional databases.

What we learned

  • Explored NEAR smart contracts and blockchain-based gaming.
  • AI integration with decentralized applications

What's next for SmartStake Chess

  • Adding more AI models and their variations
  • Scaling and optimisation to cut time delays
  • Mobile version for better user experience

Built With

Share this project:

Updates