For the hackathon I've built an implementation of the game Minesweeper that can be played on a public blockchain, namely Bitcoin in my specific case.

Because the mine location cannot be revealed publicly, the solution leverages ZK-SNARKS. Once the player picks a mine field, the servers job is to create a proof of whether the selected field actually contains a mine or not. Thanks to Bitcoin predicates the server is commited to the initial mine field configuration so he cannot change it during the game. This ensures the server is honest, so there's minimal trust needed between the player and the server.

I've recorded a short elaboration video in which I briefly go over my solution:

The code is avaliable on GitHub:

Edit (late submission): I've now also recorded a demonstration of playing a full game on the bitcoin testnet.

~Mihael Šinkec, 2022-12-02

Built With

Share this project: