Seeja - The First Fully On-Chain Strategy Board Game on Massa

What is Seeja?

Seeja is an ancient strategy board game with a 7x7 battlefield, custodial captures, ransoms, and tactical dog placements. fully on-chain on Massa, with zero backend servers. Every move, every capture, every coin ,it all lives on the blockchain.

No server. No database. No middleman. Just pure decentralized strategy.


How It Works

Stake & Play

  • Each player stakes 24 MAS to enter a game
  • Winner takes 44 MAS (4 MAS platform fee)
  • If you cancel a waiting game, you get a full refund
  • If you surrender, your opponent wins the pot

Game Flow

  1. Connect wallet (Bearby or MassaStation)
  2. Create or Find a game : “Find Game” auto-matches you with a waiting opponent, or creates a new game if none available
  3. Place your dogs : Take turns placing 24 pieces each on the 7x7 board (center cell is sacred . no one can place there)
  4. Move & Capture : Sandwich opponent pieces between yours to capture them. Capture all or block all to win
  5. Ransom

The Board

  • 7x7 grid, 24 dogs per player (48 total)

  • Custodial capture: trap an enemy piece between two of yours (orthogonally)

  • Anti-stalling: you can’t move the same piece more than 4 times consecutively


Technical Architecture

Smart Contract

  • Language: AssemblyScript compiled to WASM

  • Address: AS12hht2tUKtcTR89DrdLdChgh3sju5kZ5pCgGJag7x8k2XFAv1Lf

  • All game logic on-chain: board state, move validation, capture detection, win conditions, stake management

  • 12-tier military ranking system: Apprentice to Marshal, based on cumulative points

  • Top-100 leaderboard: single read call, no N+1 queries

Contract Functions

Function Type Description
createGame Wallet (popup) Stake 24.5 MAS, register session key
joinGame Wallet (popup) Stake 24.5 MAS, join existing game
placeDog Session key Place a piece during placement phase
makeMove Session key Move a piece during movement phase
surrender Session key Forfeit the game
requestRansom Session key Reclaim a captured piece
cancelGame Both Cancel a waiting game (full refund)
handleTimeout ASC Auto-forfeit AFK players
handleGameExpiry ASC Auto-cancel stale waiting games
processCleanup ASC Batch cleanup of old game data

What Makes This Different

Feature Seeja Typical Web3 Games
Game logic 100% on-chain Off-chain server
Frontend hosting DeWeb (on-chain) AWS/Vercel
Move signing Session keys (no popups) Wallet popup every action
Timeout handling ASC (autonomous) Manual or centralized cron
Data cleanup ASC (autonomous) Admin scripts
Backend server None Required

Zero servers. Zero databases. Zero centralized infrastructure.

The smart contract IS the server. DeWeb IS the hosting. Massa IS the runtime.

Links


Hey, really cool project, super clean to have everything 100% on-chain like that.

Just one thing on the frontend: when you connect with Massa Station it automatically picks a wallet, so you can’t choose which one you want.

You can check how it’s done here for reference:
https://github.com/massalabs/syntra/tree/main/front/src/components/ConnectWalletPopup
And how it’s used in the navbar:
https://github.com/massalabs/syntra/blob/aeba0ca2436c5b23c0576d21b16950d11e1e9ff0/front/src/components/NavBar.tsx#L40

Adding a proper wallet selection would make the UX a lot smoother.

Hi there,
Did you manage to do it ?
Do you need help maybe ?
Don’t hesitate to ask if so !