Light-weight application specific zkVM for proving the gameplay of the collector game
This is a simple game where the goal is to collect as much treasure as possible in a limited number of moves. The game play is proved using a zkVM that is specially designed for this game. User's gameplay strategy stays private and only the score is published on the leaderboard along with a zk proof that the score is valid.
With general purpose zkVMs, we can prove execution of arbitrary code. However, proving that client side is very resource intensive. The idea with this project is basically a PoC that we can design application specific zkVMs for games such that the gameplay is provable on consumer hardware, so that it is not required to trust a cloud proving service with a secret gameplay strategy.
We are using o1js for writing the zk circuits and phaserjs+svelte for UI.
It was a great development experience using o1js. Since the tech is evolving, we faced some issues but received quick help from the community on the Discord server. Also doing recursion was very easy using o1js since the zkVM heavily depends on it.