project screenshot 1
project screenshot 2
project screenshot 3

TIL ZK Hunt n Fhenix

what I learned about ZK gaming from forking U ZK Hunt, a 2-year-old zk on chain gaming project, and FHE from Fhenix

TIL ZK Hunt n Fhenix

Created At

ETHOnline 2024

Project Description

first I explored ZK hunt which is an onchain game based an old version (1.2) of mud.dev and using old versions of various tools (eg yarn) and it took some effort to get it working and I set up the architecture for new Circom circuits in order to implement modified movement rules for the game and those would generate solidity contracts and which would verify proofs generated in the react and phaser front end of the game UI.

from that exercise i understood better the ways zero knowledge proofs, Diffie-Hellman key exchange with pre-registered public keys, and commitments with a challenge response, could be useful in a multiplayer game using only smart contracts to coordinate.

then i got Fhenix running locally and explored how it supports private or encrypted transaction data.

How it's Made

zk hunt uses an old version of mud, an old version of yarn, and an old version of snarkjs to generate solidity code which itself is postprocessed through a small JavaScript code. the frontend is based on react with phaser for the game itself.

the fhenix test uses a docker based local testnet and a hardhat plugin and otherwise the contracts are written in a special variant of solidity to support encrypted values and a JavaScript library for decrypting values from contracts.

background image mobile

Join the mailing list

Get the latest news and updates