A game where zkp is used to implement the werewolf social game on-chain, with AI players integrated with chatgpt
This is an attempt to implement the classic social game --- werewolf or mafia --- on blockchain using zero knowledge proofs. ZK primitives such as zk shuffling was implemented. Some basic (and dumb) AI players are made. The problem revealed a few limitations of the current blockchain infra, such as the speed bottleneck and the lack of session key, both of which are essential for gaming.
ZK was built using circom. On-chain development is all solidity. Frontend is vite, react, ethers. The chats are generated by chatgpt and routed through a minimalist chat server. The on-chain part is broken into several contracts due to the size limitation. I tried using wagmi but it didn't work somehow.