Protocol Concepts

Verifier Contract

ChessFish Verifier

The verifier contract is the main contract behind verifing and validating all possible legal chess moves. The verifier contract also determines the outcome of the game, whether it is a stalemate, or checkmate.

The verifier contract has been tested on hundreds of thousands of games from For each game, the verifier contract has returned the same outcome as have other off-chain chess move verifiers.

Currently the verifier, by default auto-queens when a pawn reaches the other side of the board.

MoveVerifier board visualizer function

The MoveVerifier contract stores the chessboard state as a uint256 value.

Intial gameState uint256: 0xcbaedabc99999999000000000000000000000000000000001111111143265234

Initial state string: R,N,B,K,Q,B,N,R,P,P,P,P,P,P,P,P,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,.,p,p,p,p,p,p,p,p,r,n,b,k,q,b,n,r