zkWitches - An on-chain social deduction game

ZKWitches

ZKWitches is a new, original, on-chain social deduction game. It leverages zkProofs to provide unique mechanics - players can partially reveal information while staying honest despite there being no central trusted server.

Application Type

zkDAO

Proposal Overview

ZKWitches is a gothic themed social deduction game. Each round of the game will involve 4 players taking turns on a web based dapp.

Players begin by choosing their “village” / hand, which is committed as a hash on-chain.
Players can gather resources, steal resources from other players, and launch inquisitions to find “witches”.
Most actions require players to disclose some secret information about their “village”, without fully revealing their “village”.
Players can be eliminated, and the last person standing wins!
Full rules are listed on the app itself.

The game is complete and playable on both mainnet and testnet - via web browser and browser extension wallet.

The game has appealing pixel art that bridges the gap between spooky and cute.

Technical Details

The game is implemented as a smart contract that runs a state machine, along with 3 dependent smart contracts that serve as zk proof verifiers.

The contents of a players “village”/hand is secret and is never fully revealed. Instead, zkProofs are submitted by the player via their contract calls that show that their hand has certain properties.

There are 3 original circom circuits in this application

  • one verifies the validity of the “village”/hand
  • one verifies that a player has a village with enough citizens to launch an actions
  • one verifies that a player does not have a certain “witch” villager

The react frontend stores the player’s “village” locally, and creates the zkProofs and calls the apis.

Using these techniques, the players have perform validated actions without their information being leaked on the contract.

Use Case:

ZKWitches can join the ranks of many game-based projects on Harmony that leverage Harmony’s very fast transaction processing time and low fees for an experience that can’t happen on other chains.
I want to cultivate a playerbase that enjoys playing the game for its unique competitive nature and short round times. A entire self contained game can be played within 10 minutes.
There are many examples of indie social deduction video games taking off and attracting a lot of mainstream attention (Among Us, Town of Salem, Jackbox).

The game does not have any monetization at the moment but there are several ideas to add going forward:

  1. Poker-Style Gambling. Players would ante into a pot and the winner would take the pot. “House” (the smart contract) would take a percentage of the winner’s pot as a fee.
  2. Cosmetic NFTs / Tokens: players can purchase skins/designs and have their villages take on that appearance for all their games.

Competitive Landscape

In terms of competitors - I think the most obvious on-chain competitor is DarkForest. However, DF favors much larger and longer games - I want to aim at people that want to play a pickup game or a short game with friends.

Offchain - the social deduction games mentioned before - Among Us is the biggest.

Proposal Ask

ZKWitches will be established to be community-driven and self-funded by the DAO (to be created). To get this up and running, we will be requesting the $15k/year stable basic income to take care of initial development, welfare and operations costs.

This ask will be in line with the laid down milestones as detailed below

launching a feature-complete product on our testnet
forming a DAO with 5-out-of-9 multisig with our DAOs
launching on our mainnet with audit
attracting 1k daily active users (with launch video, full PR promotion)
attracting 10k daily active users (with a detailed roadmap, governance process)

Road Map + History

Completed Work:

Testnet Deployment 4/28 Done
Mainnet Deployment 5/9 Done
Redeploy Testnet+Mainnet - Bugfixes 5/21 Done

Pending Work:

Kick and Surrender Functionality - Pending
Audit of Contracts - Pending
UI Improvements (Mobile version) - Pending
Gameplay variants experimentation - Pending
Re-film and edit improved Demo video - Pending
Art Subcontracting - Pending

External links

Contract:

GitHub

Frontend:

Backend:

Demo video:

Demo site:

https://zkwitches.vercel.app/

1 Like

Hi Chris, will there be any simple way that we can test the game quickly? I have just joined a game and realized that the game will be stuck forever if a player doesn’t make a move.
Screen Shot 2022-06-08 at 15.58.37

p.s. the UX for choosing my village citizens was also super confusing, not sure if sliders together with checkboxes are the best idea. Since 7 is such a small number, maybe something as simple as 7 dropdown boxes will be easier to comprehend.

Thank you for the feedback, Cathie!

Right now it’s difficult for a single person to proceed through the whole game without some setup.
In my testing, I generated multiple accounts and swapped between them, and had some injected scenarios for testing purposes.

You can do the same on the testnet app below, but it’s not idea.
https://zkwitches-test.vercel.app/


I have been working on a “offline” mode for the UI where you can play against simple AI opponents for demo purposes. That is forthcoming.

Thanks for the update, Chris! Maybe testing on the testnet version now is the only thing we can do among governors. But nonetheless, there is a need for a feature to “unstuck” a stagnant game lobby.

I will test for a bit more first before I comment more.