Blockchess

Real-time cross-chain chess game where players vote on moves with USDC stakes and earn rewards

Blockchess

Created At

ETHGlobal Cannes

Winner of

World

World - World Pool Prize

Prize Pool

Project Description

BlockChess is a collaborative chess game we built where players join teams (white or black) and vote on the next move in real-time. What makes it unique is the blockchain integration - players stake USDC to vote for moves, one vote per turn, and the winning team gets the pot proportionnaly to each player's vote. The improvement is that it can be played from many chains without the need for users to be on the same chain, thanks to Circle's CCTP in order to collect and distribute the rewards cross chain.

I was inspired by the idea of turning chess into a community decision-making game with real stakes. The frontend is React/TypeScript with a clean voting interface, the backend is Go with WebSocket for real-time updates, and I wrote Solidity contracts for the staking and rewards mechanism.

Players connect their wallets, pick a team, and then vote on moves during 15-second turns. The most voted move gets executed automatically.

The cross-chain aspect was particularly fun to implement - winners can receive their rewards on any of the supported chains from where they are playing, making it truly multi-chain.

How it's Made

The architecture has three main parts that we built from scratch:

Frontend: React + TypeScript with RainbowKit for wallet connections. We used WebSockets for real-time voting updates and built a custom chess board component. The UI shows live vote counts and has a clean approval flow for USDC transactions.

Backend: Go server handling WebSocket connections, game state management, and blockchain interactions. We implemented a voting system that tracks moves per turn and automatically executes the most popular choice when the timer hits zero. The tricky part was syncing the chess logic between the frontend/backend and the blockchain state.

Smart Contracts: Three main contracts - GameFactory creates and manages new games, GameContract tracks individual game state and votes, and VaultContract handles USDC staking and rewards distribution with Circle's CCTP for cross-chain transfers. We deployed across 10 testnets :

  • Ethereum Sepolia
  • Base Sepolia
  • Optimism Sepolia
  • Arbitrum Sepolia
  • Avalanche Fuji
  • Polygon Amoy
  • Unichain Sepolia
  • Linea Sepolia
  • Sonic Testnet
  • World Chain Sepolia

The most interesting technical bit was integrating Circle's Cross-Chain Transfer Protocol. Winners can receive USDC rewards on any supported chain, not just where they staked. We also built deployment scripts that automatically set up the contracts across all networks.

For testing, we created a script that forks Base/Optimism Sepolia locally and credits test accounts with USDC, making development much smoother.

background image mobile

Join the mailing list

Get the latest news and updates