Playing chess on Bitcoin Cash smart contracts
Watch on YouTube (opens in a new tab)- Speaker
- SayoshiHelpMe
- Event
- BCH Bliss 2025
- Published
- Length
Transcript
I know this has been a little bit of a meme in the Bitcoin space of when chess on Bitcoin. So in this case, we are using eight CashTokens contracts. We have the chess master contract, and it controls what turn it is and has the king died. The squares contract, which is the board, and then the piece logic. So it's one contract for each type of piece. Each square of the board is a UTXO living on the squares contract, and they all have their state that manages the board.
When you do a transaction like moving a pawn from square 14 to 22, those UTXOs have to be in the transaction. It will fail without them. This is how the rules are verified. So, if you've got a queen on square 4 and it's moving all the way 60, all of those UTXOs must be in the transaction in the correct order.
The downside with this is there's no check or checkmate. Knowing the entire state of the board, you'd have to throw all those into a transaction and you might be able to figure it out, but it just seemed too intensive of a process. So, I just figured out this way with this system. Once the king is killed, then the game has to end.









