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 wallet address, or start a game against the AI with four difficulty levels. AI moves cost gas per move:

  • Easy — casual play (15 TGas/move)
  • Medium — balanced challenge (40 TGas/move)
  • Hard — strong opponent (75 TGas/move)
  • Very Hard — max difficulty (150 TGas/move)

Human-vs-human moves cost only the standard transaction gas (you pay just for your own move). In AI games, your single transaction also computes the AI's reply, so higher difficulty = more gas.

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 PPP (Protocol Pawns Points) for playing and winning. Complete daily quests and unlock achievements. Your ELO rating is tracked on-chain.

PPP Points System (PPP)

PPP (Protocol Pawns Points) is a non-transferable on-chain token. You earn it by playing — every move counts, every win matters. Points are awarded through quests (repeatable) and achievements (one-time).

ELO Rating

Every game you finish updates your ELO rating, stored directly on the smart contract. Win against stronger opponents to climb faster. Your rating is visible on your profile page and on the leaderboard.

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

AI Agent Skill

Protocol Pawns exposes a machine-readable agent skill that lets AI agents and bots autonomously play chess on-chain. Agents can register, create games, challenge opponents, place bets, and compete on the ELO leaderboard — all through the smart contract.