Zypher Research | How to Build Verifiable On-Chain Games Supported by zkVM

Zypher Research
2024-04-18 17:11:54
Collection
Zypher integrates Risc Zero's general zkVM and Bonsai proof market into its game engine, and expands its capabilities through a dedicated game SDK, broadening Risc Zero's use cases to support Autonomous Worlds with authenticity, integrity, and validity.

Zypher aims to build a new open and decentralized gaming paradigm by replacing trust in game studios/publishers with a trustless state machine. These games are composable and interoperable at the state and logic levels, allowing developers to make permissionless modifications on-chain, laying the foundation for an open economy and infinite sustainability in on-chain gaming.

However, integrating "core gameplay" on-chain faces some dilemmas. Let's take a familiar card game as an example:

  • A transparent ledger cannot meet the need for "hidden" information and cannot selectively display cards only to the cardholder.

  • Players need to wait for state transitions (player actions) to synchronize with the clients of other games.

The existing dApp infrastructure, primarily based on EVM, is not designed for high responsiveness and frequent state transitions, failing to provide the necessary cost efficiency and scalability. As a result, most on-chain games are designed as Web 2.5 games, featuring an on-chain asset layer to ensure asset interoperability and credibility, while the "core gameplay that generates assets" remains centralized.

On-Chain Game Development Reform

Zypher has developed multiple ZKP solutions based on Solidity/Rust/WASM to address these issues, offloading resource-intensive computations off-chain and verifying game results on-chain.

  • The Secret Engine provides a set of SDKs for strategy hiding and achievement proof in games, such as shuffling SDKs and matching SDKs, to meet the needs for on-chain randomness and information asymmetry.

  • The AW Engine offers high throughput through vertical scaling; it also supports customizable zk-driven micro-chain equipment - Z4, for real-time multiplayer gaming.

  • The Zytron Kit is a customizable L3 Rollup Stack that supports both engines as precompiled contracts, along with other plug-and-play modules, including optimized P2P layers/data compatibility modules/server sharding, etc.

Zytron's first alpha testnet, featuring 0 gas fees, 0.2-second block times, and precompiled contracts designed specifically for gaming, will be launched in two weeks, with several games as early testers from our gaming community. More details will be announced soon.

Above: A real-time PVP game demo powered by Zypher AW Engine and Bevy Engine, with a 100-fold increase in throughput.

Below: The first fully on-chain, AI-generated trading card game (TCG), driven by Zypher Secret Engine's zk-shuffle and zk-matchmaking SDK.

Risc Zero zkVM: Verifiable Computation, Verifiable Games


Ethereum was not originally designed with zero-knowledge proof (ZK) friendliness in mind, so many parts of the Ethereum protocol require substantial computation when performing ZK proofs.

Vitalik, "different types of ZK EVMs"


Risc Zero has developed a unique general-purpose, verifiable zero-knowledge virtual machine. By executing logic in the zkVM, the output of the code is faithfully generated and never manipulated. This provides trustless authentication and verification, laying the foundation for open, DAO-governed, self-sustaining on-chain gameplay.

In games, executing logic in the zkVM ensures that the output of the code is faithfully generated and never manipulated. This provides a trustless way to authenticate and verify that users have performed certain tasks, such as upgrading a fortress building or completing a campaign, without needing to register each event as a separate transaction. More importantly, any player in the community can pair the game's output with self-proving proofs to demonstrate that the game results are unaltered and fairly verifiable, laying the groundwork for open, DAO-governed, self-sustaining on-chain gameplay.

In the future, Zypher will also integrate with Risc Zero's proof service, Bonsai, to efficiently and concurrently generate proofs in games; this is particularly useful for players using lower-performance devices (such as mobile devices), greatly reducing the complexity during gameplay and further decreasing the reliance of Autonomous Worlds and on-chain games on hardware devices.

The integration with Bonsai will help us avoid user complaints related to proof generation.

From Zero to One, Towards Public Goods

Last week, we concluded a testing session with engineers from the Risc Zero team, which involved building a fully on-chain card game using the shuffle SDK powered by Risc Zero zkVM. The game displayed shuffling, cutting, and flipping processes with acceptable response times. Most importantly, the game is fun. The Risc Zero team mentioned that the upcoming version will support large integers, which can significantly enhance the performance of the SDK to a new level.

Risc Zero's ZK VM has alleviated the burden on general developers to write zk games in their preferred languages, allowing developers to avoid dealing with complex cryptographic circuits in low-level languages. We are now further promoting the large-scale adoption of this technology through more developer tools.

Zypher is providing a range of open-source, one-stop SDK services for developers of Risc Zero-based games. With built-in services like Shuffle SDK and highly customizable Rollup SDK, Web2 developers can directly use this toolkit to build on-chain games that are interoperable at the logic level without fundamentally changing their existing software development cycles. Zypher envisions this as a set of "public open-source products" to shift the narrative of ZK adoption from relatively "niche" to being more widely used by millions of users in the web3 space.


This collaboration is an exciting step towards the future of on-chain gaming. It lays the groundwork for a new generation of games that are no longer constrained by gas fees and EVM. It showcases how world-class teams like Zypher Games can build innovative and efficient ZK-based applications using RISC Zero zkVM.

  • Steven Li, Growth at Risc Zero

As we embark on this strategic partnership with Risc Zero, we are excited to lead a new wave of innovation in on-chain gaming. Their pioneering efforts in developing the Risc Zero zkVM and Bonsai marketplace are fundamentally changing the way we handle on-chain computation, paving the way for more efficient, scalable, and secure games. We believe that together, we can create groundbreaking solutions that benefit users worldwide.

  • Neo Sun, Zypher Games CTO

About Zypher Games

Zypher Games is building the next generation of autonomous world infrastructure, including a range of ZKP-driven game engines from sovereign Layer 3 Rollups to ZK-as-a-service SDKs. Our technology provides the necessary composability, programmability, scalability, and cryptographic primitives for decentralized gaming. It empowers game developers to create rich, interactive on-chain worlds, emphasizing scalability, fairness, and the complexity of game strategies.

Related tags
ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
banner
ChainCatcher Building the Web3 world with innovators