Trustless zkMafia
{"type": "project", "title": "Trustless zkMafia", "logoImg": "bafkreic2asu6vhqejetjw5pkyettemyixqrytjgycwr466hq5dnv4z46ha", "website": "https://www.accessorlabs.org/", "bannerImg": "bafkreif4jovoyotkkwt3d7p5zjs5mjvuzrdc2viynea2wiwo7qfpegdsva", "createdAt": 1681945897050, "userGithub": "harrykingdon", "credentials": {"github": {"type": ["VerifiableCredential"], "proof": {"jws": "eyJhbGciOiJFZERTQSIsImNyaXQiOlsiYjY0Il0sImI2NCI6ZmFsc2V9..H3vbf0dKKaWj1B2pxyNwnDg0hpyLMCPaDN1fMwecBQzAG6EUe8OJo41xyd2W58syIGNcVSIvKIj1U5ngbulGDQ", "type": "Ed25519Signature2018", "created": "2023-04-19T23:18:47.801Z", "proofPurpose": "assertionMethod", "verificationMethod": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC#z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC"}, "issuer": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC", "@context": ["https://www.w3.org/2018/credentials/v1"], "issuanceDate": "2023-04-19T23:18:47.800Z", "expirationDate": "2023-07-18T23:18:47.800Z", "credentialSubject": {"id": "did:pkh:eip155:1:0x52277e5CF8dF8eF51d9bD37D8D7553A72D378BEf", "hash": "v0.0.0:l5aZmuAEuwrY/2qD74sWGWpMtGzjHJGFOZyQwrwuE/w=", "@context": [{"hash": "https://schema.org/Text", "provider": "https://schema.org/Text"}], "provider": "ClearTextGithubOrg#accessorlabs#40477877"}}, "twitter": {"type": ["VerifiableCredential"], "proof": {"jws": "eyJhbGciOiJFZERTQSIsImNyaXQiOlsiYjY0Il0sImI2NCI6ZmFsc2V9..PAyAjsRW1RVQSAANXqvocN7PsO1p48oE9N_LPZUpyYRp0pZSM6MTObDThaVj-yARiMvBx96a-PyYclwKo_omBg", "type": "Ed25519Signature2018", "created": "2023-04-19T22:55:25.014Z", "proofPurpose": "assertionMethod", "verificationMethod": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC#z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC"}, "issuer": "did:key:z6MkghvGHLobLEdj1bgRLhS4LPGJAvbMA1tn2zcRyqmYU5LC", "@context": ["https://www.w3.org/2018/credentials/v1"], "issuanceDate": "2023-04-19T22:55:25.014Z", "expirationDate": "2023-07-18T22:55:25.014Z", "credentialSubject": {"id": "did:pkh:eip155:1:0x52277e5CF8dF8eF51d9bD37D8D7553A72D378BEf", "hash": "v0.0.0:rDOzIDwIyOKK1yZW1qAbcs8KguI/ik+qNp/gLuflp28=", "@context": [{"hash": "https://schema.org/Text", "provider": "https://schema.org/Text"}], "provider": "ClearTextTwitter#accessorlabs"}}}, "description": "# Grant Proposal: Trustless zkMafia\n\n## Introduction\n\nWe (Baz & Goblin Oats) at Accessor Labs are thrilled to submit our grant proposal to develop a **trustless version of the game Mafia** (a.k.a. \"Werewolf\"). By pushing the limits of what's possible onchain, this novel application will showcase the potential of **zero knowledge proofs**, and furthermore, will include the creation of several ambitious **open-source ZK primitives** that will be of use to other developers in the Ethereum ecosystem, both within and beyond gaming. \n\nWithout getting *too* buzzwordy, the fullest extension of this project will include:\n\n- A **fun, open-source game** to onboard people into the Ethereum ecosystem.\n- An open-source library to implement a **general-purpose hidden information mechanic** into games. This could potentially be applied to other contexts, such as the urgent matter of privacy in decentralised finance.\n- [Potential extension] A demonstration of the power of **client-side proof generation**, using **GPU hardware acceleration**, so that players can generate proofs locally and quickly instead of relying on centralised proof generators. \n- [Potential extension] An **open-source library** to implement client-side proof generation, for wider application both within and beyond gaming.\n- [Potential extension] A demonstration of the power of **ZK-enabled machine learning**, in the context of intelligent in-game **NPCs**, against which players can trustlessly compete.\n- [Potential extension] An **open-source library** to implement ZK-ML into your own games, especially to enable the creation of NPCs.\n\n\n## Project Overview\n\nWe plan to build a proof of concept game of Mafia with the following features.\n\nThe game itself will consist of several players all guessing who the killer is. They deliberate and vote together, and one-by-one, players are eliminated until either the killer wins or is eliminated. Using ZK, players can verify whether or not their vote correctly identified the killer, **without revealing anything else** (such as the killer's identity if they voted incorrectly). *No central omnipotent third party is required.*\n\n**Hidden information mechanics** (such as these) are a core part of game design - from ancient poker to modern RPGs. However, hidden information is - by its very nature - hard to generate and interact with, in the context of a public, immutable, transparent ledger. [Recent work](https://geometry.xyz/notebook/mental-poker-in-the-age-of-snarks-part-1) by Geometry in conjunction with MatchboxDAO showcases how cryptographic innovation makes hidden information game mechanics possible, and we'd like to implement their research. \n\nAs a team we have **prior traction and experience** building out this system. We wanted to build this at the latest ZK Hack in Lisbon, but realised that the task was way too big for one hackathon. Instead, Goblin Oats, together with the team at Geometry, built a necessary component of the game's infrastructure to work on the Polygon Miden ZKVM, namely, [ElGamal encryption](https://github.com/goblinoats/miden-vm/tree/gob-elgamal-zkhack), for which we were fortunate to be **prizewinners**.\n\nThe team also has professional experience building out privacy tooling in the context of gaming, at Epic Games, for some of the biggest games in the world, including Fortnite, Fall Guys, Rocket League, Pokémon Go and Among Us.\n\nBy also building an **open-source library** for generating a structurally similar hidden information mechanic in any game, this will create value to onchain game developers of all stripes. Furthermore, this will act as critical research into the relatively under-funded benefit of ZK compared to scaling - namely, privacy, which will have wider application to the future of **decentralised finance**.\n\n## Extension to hardware acceleration for proof generation\n\nTo achieve maximal trustlessness and remove the dependence on a centralised prover, we would **ideally like to generate proofs locally, client-side.** In today's world this is impossible given the **enormous computational cost** of proof generation, but in conjunction with the GPU hardware acceleration work being done by our friends at **Ingonyama**, we believe we can implement a proof-of-concept for client-side proof generation. This would represent a step forward for the industry and open up an incredibly exciting design space for fully decentralised, locally-generated proofs.\n\nPotentially this could be extended into a general purpose **open-source library** for dynamic client-side proof generation in the context of trustless hidden information video games.\n\n## Extension to ZKML\n\nThe hot topic on everyone's lips! ZKML is very exciting because the possibility of verifying model execution has enormous benefits for verifying that a given model was **run correctly**, without revealing the **sensitive private inputs** to that model, or the **proprietary internal tuning** of the model itself.\n\nFurthermore, bringing intelligent non-player agents into onchain games is important for **enriching onchain games with NPCs** that can have hidden internal psychology and biology, but can still behave verifiably and trustlessly. *Trustless NPC infrastructure is a key component of Ethereum's future gaming ecosystem.*\n\n**Ideally** we'd like to create a version of Mafia where players can play using a live video stream, against an NPC detective who can guess who is lying and who is telling the truth, based on facial pattern recognition. Not only would this add an extra layer of fun gameplay, it would also act as critical research into an emerging, exciting technology.\n\nPotentially this could be extended into a general purpose **open-source library** for ZKML in the context of NPC creation for onchain video games.\n\n## Final word\n\nThank you for getting this far! We are beyond excited about the potential of this project and would be grateful for your support in bringing it to life. Send us a message on [Twitter](https://twitter.com/accessorlabs) / our [Discord](https://t.co/kODfOruo0o), we love to chat!\n\nAll best,\n\nBaz and Goblin Oats,\n\n_Accessor Labs_\n", "logoImgData": {}, "bannerImgData": {}, "projectGithub": "accessorlabs", "projectTwitter": "accessorlabs"}