logo

Protocol Pawns

About Protocol Pawns

What is Protocol Pawns?

Protocol Pawns is the very first fully decentralized on-chain chess game built on NEAR Protocol. Every move is recorded on-chain, every game is verifiable, and there are no centralized servers controlling your games.

How to Play

1. Connect & Register

Connect your NEAR wallet and register with a one-time storage deposit of 0.05 N.

2. Start a Game

Challenge another player by entering their account ID, or start a game against the AI with three difficulty levels:

  • Easy — casual play, low gas (~8 TGas)
  • Medium — balanced challenge (~30 TGas)
  • Hard — strong opponent (~110 TGas)
3. Make Your Moves

Click or drag pieces on the board. Each move is a signed on-chain transaction. The contract validates all moves so you can't cheat.

4. Win & Earn

Earn points for every game you play and win. Your ELO rating is tracked on-chain. Climb the leaderboard!

Features

  • - Fully on-chain chess with move validation
  • - Challenge any NEAR account to a game
  • - Play against AI (Easy / Medium / Hard)
  • - ELO rating system stored on-chain
  • - Points earned for playing and winning
  • - Push notifications for your turn
  • - Wager tokens on games (coming soon)

Smart Contract

The chess engine runs entirely inside the NEAR smart contract at app.chess-game.near. It validates legal moves, detects checkmate and stalemate, and emits NEP-297 events for every game action.

Tech Stack

  • - Contract: Rust on NEAR Protocol
  • - Indexer: GoldSky (NEP-297 event pipeline)
  • - API: Cloudflare Workers + Hyperdrive (PostgreSQL)
  • - Frontend: SvelteKit + Svelte 5 + UnoCSS
  • - Wallet: @hot-labs/near-connect