Fully on-chain games/autonomous worlds are one of the most important narratives in Web3. As of the end of October, the daily active users (DAU) of web3 games reached as high as 5.3 million, showcasing massive market potential. Unlike Web2.5 applications, fully on-chain games/autonomous worlds deploy all game logic on the blockchain, directly using the blockchain as the game server to ensure that every user action occurs authentically on-chain, bringing significant advantages such as decentralization, trustworthiness, and strong composability. However, traditional games still face significant challenges in performance bottlenecks, scalability, and privacy when embracing web3. Nova is a folding scheme that has the potential to reshape the gaming landscape and lead web3 games into a new era.

What is Nova

Nova [1] is a recursive proof system based on folding schemes, specifically designed for R1CS, capable of efficiently implementing Incremental Verifiable Computation (IVC). IVC is a cryptographic primitive that ensures the integrity of a given computer program's execution by proving the correctness of each step's results, thereby ensuring that each step correctly executed all previous results.

Firstly, what is IC (Incremental Computation)? IC refers to recursively applying the same function F to perform calculations, i.e., by inputting an initial state and obtaining a state after this iteration, as shown in Figure 1.a. If the function F also includes a verification circuit, then we obtain IVC (Incrementally Verifiable Computation). IVC allows the Prover to prove to the Verifier and generates a concise proof at each step, ensuring that the computation process is correct from the start to the step, as shown in Figure 1.b. It can be seen that this method can break down large computations/statements into smaller pieces, which can then be executed more efficiently by repeating the same code blocks.

Nova proposes a highly innovative folding scheme that merges two R1CS instances along with their respective witness instances into one. Compared to Snark-based IVC, Nova does not require verification of previous Snark proofs in each recursion, thus having the following characteristics:

  • No trusted setup required

  • No FFT calculations required, nor do we need pairing-friendly elliptic curves

  • Constant verification time

  • Only for R1CS instances, it will merge 2 R1CS instances into 1 R1CS instance

Why Nova

Web3 games have broad prospects but also face many challenges. Firstly, for real-time fast-paced games, the response time for operation instructions is typically measured in milliseconds; however, most blockchains still lack the capabilities required to support high-performance gaming. Secondly, as transaction volumes increase, blockchains may become congested, leading to delays that affect the user experience.

To address these issues, we explored a method called Game Rollup. Game Rollup aggregates game operation instructions into the same circuit through the Groth16 proof system, then generates a proof and uploads it to the blockchain for verification. With this approach, players can perform more actions before interacting with the blockchain, enjoy a longer gaming experience, and avoid having to wait for confirmations on the blockchain for each action.

Specifically, our Rollup circuit can also be represented in IVC form:

where F is the turn function of the game.

Taking our 2048 game as an example, this is an on-chain adaptation of the classic sliding puzzle game. The biggest challenge in designing 2048 lies in the design of the F function. In the 2048 game, there are four possible instruction inputs: up, down, left, and right for each turn. To accommodate these four inputs, the design of the F function (circuit) needs to be quite sophisticated, as it fundamentally differs from implementations of 2048 logic on-chain through smart contracts, which typically handle instructions with simple if statements (e.g., if up {}, else if down {}). However, the circuit does not support direct use of if-else structures, which we will discuss in detail in the next article.

Solana is a high-performance public chain capable of providing fast transaction confirmation speeds, but even so, the experience of the 2048 game [2] deployed on it still does not reach the desired smoothness. In contrast, our Game Rollup-based approach provides a smoother gaming experience, which also proves the advantages of Game Rollup in enhancing game performance. However, this method still has some limitations, as it is merely the most basic implementation of IVC:

  • The prover requires Ω (i * |F|) memory

  • The proof is not incrementally updatable

Until we encountered and deeply studied Nova, we felt a sense of 'too late to meet' because it breaks the limitations of Game Rollup and is expected to solve performance bottlenecks and scalability issues in Web3 games. Below are our performance benchmark tests comparing Game Rollup and Nova using the 2048 game as an example:

Summary

Nova not only has superior performance but is also memory efficient, which is very important for large circuits, as Groth16 requires a large SRS and exhausts memory. Nova can still operate efficiently in low-memory environments. Currently, some ZKVMs have begun to be built based on Nova, such as Nexus [3]. We believe that Nova will bring unprecedented performance and scalability to Web3 gaming, becoming a key technology driving the development of Web3 games. Zypher has established a close strategic partnership with Nexus and is actively collaborating to adopt Nexus's ZKVM based on the Nova system to create the next generation of on-chain decentralized application infrastructure.

Reference:

[1] https://eprint.iacr.org/2021/370

[2] https://solplay.de/solana-2048/

[3] https://nexus.xyz/