
Can zero-knowledge proofs enhance user experience by reducing the number of interactions between on-chain games and blockchains?
TechFlow Selected TechFlow Selected

Can zero-knowledge proofs enhance user experience by reducing the number of interactions between on-chain games and blockchains?
What is ZKP suitable for in the gaming industry?
Author: Yooma

Image source: https://unsplash.com/photos/people-inside-library-1mwPOXb_pB8
The Problem
PopCraft is a fully on-chain match-3 game with each session lasting 4 minutes. Players eliminate all elements on the board within the time limit and receive token rewards upon completion.
Due to its fully on-chain nature, every in-game action must interact with the blockchain. Ethereum Layer 2 block times are typically around 2 seconds, which means each player action requires at least a 2-second wait for confirmation—far longer than response times in comparable Web2 games—resulting in a subpar gaming experience for PopCraft.

Main interface of PopCraft
Proposed Solution
We propose leveraging zero-knowledge proof (ZKP) technology in PopCraft to reduce the frequency of interactions between players and the blockchain.
The envisioned approach is: gameplay remains off-chain, but with mechanisms ensuring no cheating. Each move generates a ZKP, where each subsequent ZKP is built upon the previous one, forming a self-contained, blockchain-like structure of ZKPs. At the end of the game, only the final ZKP is submitted on-chain for validation by a smart contract.
Research and Analysis
1. Cheating Prevention for Gameplay and Results: Generating a ZKP only for the final result is insufficient, as cheating can occur during gameplay. Therefore, both the outcome and the entire process must be verifiable.
2. Technical Challenges of Sequential ZKP Generation: To prevent cheating, a ZKP must be generated for each in-game action, with only the final ZKP submitted on-chain at game end. Each new ZKP depends on the prior one, creating a chain extending to the last move.
However, key challenges arise:
1> New ZKPs depend on previous ones, complicating verification and raising uncertainty about feasibility. Additionally, since ZKP verification occurs via smart contracts (on-chain), it's unclear how to verify the correctness of the prior ZKP when generating the next one.
2> When verifying each ZKP via smart contract, ensuring continuity between consecutive ZKPs presents an unresolved challenge—currently, no clear solution exists.
3. Public Game Data Considerations: PopCraft’s game data is public, so using ZKPs for data hiding is unnecessary. Even if the above verification were feasible, storing game data on-chain becomes necessary. However, due to the nature of ZKPs, specific game data cannot be extracted, and client-submitted results cannot be blindly trusted—meaning smart contracts cannot directly store such data.
4. Handling In-Game Item Usage (Token Consumption): Eliminating isolated elements using in-game items corresponds to token spending, requiring transfers from the user’s wallet. Integrating this into ZKP generation and verification poses another challenge.
1> One possible solution: Continue generating ZKPs as before, verifying the number of tokens consumed and ultimately submitting this to the smart contract. However, since the smart contract cannot extract concrete game data from the ZKP, it cannot determine the correct amount of tokens to transfer.
Moreover, suppose a player has 3 Token A but attempts to spend 4 during gameplay—the error would only be detected at game end, rather than being caught immediately during the action.
2> An alternative approach: When using tokens to remove isolated elements, directly interact with the smart contract to execute the removal and update the player’s token balance. The ZKP would then only serve as proof of the current game state after this operation.
In this case, after successfully transferring tokens, we’d still need to continue generating ZKPs like before. If not, there would be a gap between two ZKPs—an on-chain interaction step missing from the proof chain—potentially invalidating the final ZKP submitted at game end.
5. Data Hiding via ZKP Is Unnecessary: For PopCraft, where game data transparency is acceptable, using ZKPs for data hiding adds unnecessary complexity, increases difficulty in data retrieval, and introduces engineering uncertainty. PopCraft only needs to ensure cheat-free gameplay and outcomes—not conceal gameplay data.
Conclusion
In games like PopCraft, where data privacy is not required, employing ZKPs for information hiding offers no benefit. To improve responsiveness and user experience, gameplay could remain off-chain while only the final result is committed on-chain. The key lies in finding a method that ensures no cheating occurs from the first to the last move, allowing only the correct final result to be verified on-chain.
Using ZKPs for data hiding actually increases engineering complexity. Furthermore, while ZKPs can guarantee individual actions are cheat-proof, reducing blockchain interactions means we cannot submit a ZKP for every single action. Thus, ensuring end-to-end anti-cheating guarantees—from start to finish—remains unsolved with current ZKP approaches.
Based on our research, ZKPs in gaming are best suited for two scenarios:
-
Information hiding in imperfect-information games, such as Dark Forest, Texas Hold’em, Werewolf, Hearthstone, etc.
-
Single-step proof of game outcomes, such as lotteries, number guessing, rock-paper-scissors, dice games, etc.
Given our limited expertise in zero-knowledge proofs, this article may contain factual inaccuracies or impractical technical assumptions. We sincerely invite experienced ZKP experts to provide feedback and corrections.
Join TechFlow official community to stay tuned
Telegram:https://t.me/TechFlowDaily
X (Twitter):https://x.com/TechFlowPost
X (Twitter) EN:https://x.com/BlockFlow_News









