Gryphes: Hybrid Proofs for Modular SNARKs with Applications to zkRollups

Jiajun Xin (Paper author · The Hong Kong University of Science and Technology), Samuel Cheung On Tin (Paper author · The Hong Kong University of Science and Technology), Christodoulos Pappas (Paper author · The Hong Kong University of Science and Technology), Yongjin Huang (Paper author · OKG), Dimitrios Papadopoulos (Paper author · The Hong Kong University of Science and Technology)

Privacy Enhancing Technologies Symposium (PETS) 2026 · Day 3 · Alpaca

Overview

This talk introduces "Gryphes," a novel framework designed to enhance the efficiency and scalability of Succinct Non-interactive ARguments of Knowledge (SNARKs), particularly when dealing with complex, conditional computations. Presented by Jiajun Xin and his co-authors from The Hong Kong University of Science and Technology and OKG, Gryphes addresses a fundamental limitation of traditional SNARKs: their inefficiency in handling "if and else" conditions and dynamic application logic. This limitation poses a significant hurdle for real-world applications, especially in the context of zk-Rollups and decentralized exchanges (DEXs), where a multitude of transaction types and conditional operations are common.

Watch on YouTube · Slides

Visual summary for Gryphes: Hybrid Proofs for Modular SNARKs with Applications to zkRollups by Jiajun Xin, Samuel Cheung On Tin, Christodoulos Pappas, Yongjin Huang, Dimitrios Papadopoulos
Visual summary for Gryphes: Hybrid Proofs for Modular SNARKs with Applications to zkRollups by Jiajun Xin, Samuel Cheung On Tin, Christodoulos Pappas, Yongjin Huang, Dimitrios Papadopoulos

Key moments

  1. 0:30 SNARKs' challenge: inefficient if/else conditions
  2. 2:15 Real-world challenge: DEX prover burden in zkRollups
  3. 3:45 Limitations of existing SNARK solutions (e.g., Sublink)
  4. 4:10 Introducing Gryphes: fast Groth16 for modular SNARKs
  5. 5:00 Key contribution: Link protocol for composing Groth16 circuits
  6. 6:00 How Gryphes works: separating application and crypto logic
  7. 7:00 Experimental results: high TPS with minimal linking overhead
  8. 8:00 Conclusion: Gryphes achieves 90,000 TPS for dynamic applications

Gryphes: Hybrid Proofs for Modular SNARKs with Applications to zkRollups

Speakers: Jiajun Xin (Paper author, The Hong Kong University of Science and Technology); Samuel Cheung On Tin (Paper author, The Hong Kong University of Science and Technology); Christodoulos Pappas (Paper author, The Hong Kong University of Science and Technology); Yongjin Huang (Paper author, OKG); Dimitrios Papadopoulos (Paper author, The Hong Kong University of Science and Technology)

Conference: PETS

YouTube: https://www.youtube.com/watch?v=Iik-QjTwTCY

Overview

This talk introduces "Gryphes," a novel framework designed to enhance the efficiency and scalability of Succinct Non-interactive ARguments of Knowledge (SNARKs), particularly when dealing with complex, conditional computations. Presented by Jiajun Xin and his co-authors from The Hong Kong University of Science and Technology and OKG, Gryphes addresses a fundamental limitation of traditional SNARKs: their inefficiency in handling "if and else" conditions and dynamic application logic. This limitation poses a significant hurdle for real-world applications, especially in the context of zk-Rollups and decentralized exchanges (DEXs), where a multitude of transaction types and conditional operations are common.

Gryphes proposes a hybrid proof system that intelligently combines different SNARK schemes, leveraging their individual strengths. It partitions computations into dynamic application logic and fixed, heavy cryptographic proof logic, applying the most suitable SNARK to each. A crucial innovation is a link protocol that seamlessly connects these disparate SNARKs, ensuring the integrity of the overall computation with minimal overhead. The framework demonstrates impressive performance, supporting thousands of transaction types and achieving a throughput of up to 90,000 transactions per second in benchmark scenarios, making it a significant advancement for the practical deployment of scalable, privacy-preserving blockchain solutions.

The work is particularly relevant to the ongoing development of Layer 2 (L2) scaling solutions for blockchains, specifically zk-Rollups, which rely heavily on SNARKs to aggregate and verify off-chain transactions. By overcoming the challenges of conditional logic, Gryphes enables a new generation of application-rich decentralized applications (dApps) that can operate efficiently at scale, without compromising on the succinctness and security guarantees offered by SNARKs. This research not only pushes the boundaries of cryptographic proof systems but also provides tangible, open-source tools for developers to build more robust and performant decentralized ecosystems.

Background

▶ Watch: SNARKs' challenge: inefficient if/else conditions (0:30)

SNARKs represent a cornerstone technology in modern cryptography, enabling a prover to demonstrate the correct execution of a computation to a verifier with a remarkably short proof, without revealing the underlying data. Their applications are vast, spanning privacy-preserving computations, verifiable computation, and crucially, blockchain scaling solutions like zk-Rollups and decentralized execution environments. At their core, SNARKs typically encode computations into arithmetic circuits, which are then further compiled into a specific SNARK circuit format.

While SNARKs excel at verifying fixed, deterministic computations, they encounter significant challenges when confronted with conditional logic, specifically "if and else" statements. The primary reason for this inefficiency stems from how these conditions must be integrated into the circuit. If a single SNARK circuit is used, the prover is forced to evaluate both branches of the conditional statement, regardless of which branch is actually taken. This effectively doubles the computational cost for each conditional, as the prover must pay for the "worst-case" scenario. A sequence of such "if and else" conditions quickly renders the proving process prohibitively expensive.

An alternative approach involves creating separate SNARK circuits for each condition. While this avoids the double-computation issue for a single branch, it introduces its own set of problems. Each separate circuit requires its own proving key and verification key, leading to increased overhead for both the prover (managing multiple keys) and the verifier (potentially checking multiple proofs or a more complex aggregate proof). This strategy becomes unmanageable for applications with a large number of possible conditions or a deep nesting of "if/else" logic.

This problem is acutely felt in real-world applications like decentralized exchanges (DEXs) operating within zk-Rollups. In a zk-Rollup, users submit transactions to an off-chain sequencer or prover, which aggregates thousands of these transactions into a single batch. The prover then generates a SNARK proof attesting to the correctness of all transactions in the batch and posts a succinct digest (along with the proof) to the Layer 1 (L1) blockchain. This model significantly saves L1 storage and increases transaction throughput, but it shifts a substantial computational burden onto the prover.

For a complex DEX, the prover must account for a wide array of operations: deposits, transfers, exchanges (swaps), and withdrawals. Furthermore, modern DEXs support hundreds of cryptocurrencies and various trading models, including spot trading, perpetual futures, and options. Each user transaction, though simple from the user's perspective, might involve a specific combination of these operations and conditions. The SNARK circuit used by the prover must be flexible enough to encompass all possible transaction types and their associated logic. Forcing a single SNARK circuit to cover all these possibilities leads to an enormous, inefficient circuit due to the inherent conditional logic.

Prior attempts to address this problem have met with limited success:

  • Direct SNARK implementations: Projects like Loopring initially used a single, large SNARK circuit, but this approach could only support very basic operations, severely limiting functionality.
  • RAM-based SNARKs (e.g., zk-EVMs): These systems simulate RAM operations within SNARKs, offering better support for conditional switches. However, they introduce an additional layer of abstraction and overhead, often making them slower than specialized circuits.
  • Post-Quantum Fiat-Shamir schemes (e.g., Sublink): These techniques encode updatable circuits into lookup tables. While they offer some flexibility, benchmarks have shown them to be significantly slower. For instance, matrix multiplication with such schemes was found to be around 20 times slower than using a standard Groth16 circuit, which is highly optimized for fixed computations.

The overarching question remained: could a solution be developed that offers both broad functional support for dynamic, conditional logic and highly efficient proving, without the prohibitive overheads of previous methods? Gryphes emerges as a direct answer to this challenge, aiming to bridge the gap between functionality and efficiency in SNARK-based systems.

Key Findings

▶ Watch: Limitations of existing SNARK solutions (e.g., Sublink) (3:45)

The Gryphes framework introduces several significant contributions that address the long-standing challenges of integrating dynamic conditional logic into SNARKs efficiently:

  1. Gryphes Framework for Fast Groth16 with Modular SNARKs: The core innovation is a hybrid proof framework that strategically employs different SNARK schemes for different parts of a computation. Instead of forcing a single, monolithic SNARK to handle all logic, Gryphes identifies distinct components: lightweight, dynamic application logic (which benefits from flexibility) and heavy, fixed cryptographic proof logic (which benefits from optimization). This modular approach allows the selection of the most suitable SNARK for each component, leading to substantial efficiency gains. This framework directly enables the support of thousands of diverse transaction types within applications like zk-Rollups. In experimental settings, Gryphes demonstrated an impressive throughput of 11,000 transactions per second on a local server, showcasing its potential for high-volume environments. Beyond zk-Rollups, this modularity extends its applicability to various other use cases requiring dynamic logic, such as private credentials and identity systems.
  1. Novel Link Protocol for Composing SNARKs: A critical element of the hybrid framework is a new link protocol designed to commit to and connect different SNARK circuits. Specifically, it facilitates the secure and efficient composition of Groth16 circuits, which are highly optimized for fixed computations, with more flexible SNARKs like Plonk or "matrix-to-cut" systems, which are better suited for dynamic logic. This protocol achieves a quasi-linear prover complexity, constant-size proofs, and constant-time verification. These properties are vital for maintaining the succinctness and efficiency that SNARKs are known for, especially in secure Layer 2 scenarios where verifier overhead must be minimized. The protocol provides a fundamental building block for seamlessly integrating different SNARK paradigms, for instance, connecting a Plonk-like system (which uses a matrix basis) with Groth16 (which uses a vector basis).
  1. Open-Source Components and Benchmarks: The project emphasizes practicality and accessibility by providing open-source components. This includes a specific implementation for connecting "CP smart matrix-to-cut configuration" (likely referring to a Plonk-like system) with other SNARKs. The availability of source code and detailed benchmarks allows other researchers and developers to reproduce the results, build upon the framework, and integrate it into their own projects, fostering further innovation in the SNARK ecosystem. The benchmarks confirm the theoretical advantages of Gryphes, demonstrating its ability to achieve high throughput with minimal overhead, particularly for the crucial linking step between different proof systems.

Technical Deep Dive

▶ Watch: Key contribution: Link protocol for composing Groth16 circuits (5:00)

The core innovation of Gryphes lies in its recognition that not all parts of a complex computation are created equal, and therefore, should not be treated uniformly by a single SNARK scheme. The framework's design is predicated on two key observations:

Firstly, existing generic SNARKs often referred to as "matrix to cut" or "sub-block" SNARKs (such as Plonk and its variants), while offering greater flexibility for arbitrary computations and conditional logic, often come with a performance penalty. While they are designed to handle variable computations more gracefully than highly optimized, fixed-circuit SNARKs like Groth16, they may not be as efficient for the parts of the computation that are static and repetitive. The speaker notes that even these flexible SNARKs can have "worse cases" and are "not as efficient as we want" for the entire application.

Secondly, real-world decentralized applications, particularly in the context of zk-Rollups, naturally decompose into two distinct types of computational logic:

  1. Lightweight Application Logic: This encompasses the dynamic, user-specific operations that frequently involve conditional statements ("if and else"). Examples include different transaction types in a DEX (deposit, transfer, swap, withdrawal), parameter checks, or specific pricing models. This logic is highly variable and benefits from SNARKs designed for flexibility.
  2. Heavy Shared Proof Logic: This refers to the fixed, computationally intensive cryptographic operations that are common across many or all transactions within a batch. Prime examples include transaction signatures (e.g., ECDSA verification), accumulator verifications (like Merkle tree proofs for account balances or state updates), and other foundational cryptographic primitives. This logic is deterministic, well-defined, and highly amenable to optimization.

Gryphes leverages this decomposition by adopting a hybrid approach. Instead of a single SNARK, it employs two (or more) different SNARK systems, each tailored to a specific type of logic:

  • For the lightweight application logic, Gryphes utilizes a SNARK scheme that efficiently handles dynamic computations and conditional branches. The talk mentions "another matrix to cut" SNARK specifically for this purpose, implying a Plonk-like system or a variant thereof. These systems are designed to encode computations in a way that allows for more flexible circuit generation, making them suitable for scenarios where the exact execution path might vary based on input conditions. This allows the prover to only compute the necessary branch of an "if/else" statement without incurring the cost of the unused branch, which is a major bottleneck for traditional Groth16 circuits.
  • For the heavy shared proof logic, Gryphes employs highly optimized SNARKs like Groth16. Groth16 is renowned for its extremely small proof sizes and fast verification times, making it ideal for fixed, repetitive cryptographic operations that form the backbone of many transactions. Since these operations (e.g., verifying a signature or a Merkle proof) are largely identical across different transactions in a batch, Groth16's efficiency in handling fixed circuits can be fully exploited.

The critical challenge then becomes securely and efficiently linking these separate proofs generated by different SNARK systems. This is where Gryphes' novel link protocol comes into play. The protocol is designed to prove that the outputs of the application-specific SNARK correctly feed into the shared cryptographic SNARK, and that together, they represent a valid, complete transaction. The speaker highlights that this protocol is based on Plonk, and its purpose is to connect Plonk-like "matrix" representations of circuits to Groth16's "vector basis" representations.

The link protocol achieves several crucial properties:

  • Quasi-linear prover complexity: The prover's computational cost for the linking step scales almost linearly with the size of the combined computation, ensuring it remains efficient even for large batches.
  • Constant-size proofs: The resulting aggregate proof remains succinct, a fundamental property of SNARKs, crucial for minimal on-chain verification costs.
  • Constant-time verification: The verifier's cost to check the linked proof is constant, independent of the complexity of the underlying computations. This is paramount for L1 verifiers, which typically have limited computational resources.

This modular architecture allows developers to choose the most appropriate SNARK for each part of their application, optimizing for both flexibility and raw cryptographic efficiency. The overall transaction logic is thus composed by linking these specialized SNARKs, creating a "hyper stack framework" that supports dynamic application logic while relying on fixed, highly optimized cryptographic operations. The "CP smart matrix to cut configuration" mentioned in the talk likely refers to a specific implementation or tooling within this framework that facilitates the generation of the flexible SNARK circuits for the application logic.

Demo / Proof of Concept

▶ Watch: How Gryphes works: separating application and crypto logic (6:00)

The talk effectively demonstrates the practical viability and performance benefits of the Gryphes framework through a detailed experimental setup and results. The proof-of-concept (PoC) was conducted on a local server equipped with four CPU cores and 128GB of memory. The scenario simulated a busy zk-Rollup environment designed to support 16,000 users, process 1,000 different transaction types, and aggregate transactions into batches of 1,000 transactions per proof. This realistic setup aims to mimic the demands of a high-throughput decentralized exchange.

The experimental results meticulously break down the proving time across the different components of the Gryphes framework:

  1. Logic Prover (Dynamic Application Logic): This component is responsible for proving the correctness of the flexible, application-specific logic, which includes handling conditional statements and various transaction types. In the benchmark, this part took 46 seconds, accounting for approximately 50% of the total running time. This demonstrates that the chosen SNARK for dynamic logic efficiently processes the variable parts of the computation.
  1. Crypto Prover (Heavy Shared Proof Logic): This component handles the fixed, computationally intensive cryptographic operations, such as verifying transaction signatures and accumulator updates (e.g., Merkle tree proofs). Leveraging existing optimized SNARKs (likely Groth16), this part completed in 34 seconds, contributing approximately 48% of the total time. This highlights the efficiency gained by using highly specialized SNARKs for the static cryptographic backbone.
  1. Link Protocol: The crucial step of connecting the proofs from the Logic Prover and the Crypto Prover, ensuring their integrity and consistency, was remarkably fast. The link protocol took only 1.5 seconds, representing a mere 3% of the total proving time. The speaker emphasized that this overhead is "almost negligible," underscoring the efficiency of their novel composition mechanism.

Aggregating these times, the total proof generation for a batch of 1,000 transactions was approximately 81.5 seconds (46 + 34 + 1.5). This translates to an impressive throughput. While an earlier general claim of 11,000 transactions per second was made, the specific benchmark on the four-core server demonstrated an even higher peak, achieving 90,000 transactions per second. The speaker noted that the overhead for linking two switches (different SNARKs) was only 2% of the total time, further reinforcing the efficiency of the hybrid approach.

These results are a strong validation of the Gryphes framework. They confirm that by intelligently decomposing computations and applying specialized SNARKs linked by an efficient protocol, it is possible to achieve both broad functional support for dynamic logic and high transaction throughput. The minimal overhead of the link protocol is particularly significant, as it ensures that the benefits of modularity are not negated by the cost of composition. The open-source availability of the components further facilitates adoption and future development based on these promising findings.

Defensive Implications

▶ Watch: Conclusion: Gryphes achieves 90,000 TPS for dynamic applications (8:00)

The Gryphes framework introduces profound defensive implications for anyone involved in designing, operating, or securing zk-Rollups and other SNARK-based decentralized systems. By addressing the long-standing inefficiency of SNARKs with conditional logic, Gryphes empowers defenders and developers to build more robust, scalable, and feature-rich applications.

  1. Enabling Complex dApps on L2s: The most significant implication is the ability to deploy highly complex and application-rich decentralized applications (dApps) on Layer 2 solutions without prohibitive proving costs. DEXs, for example, can now support hundreds of cryptocurrencies and diverse trading models (spot, perpetual futures, options) within a zk-Rollup environment, previously constrained by the computational burden of aggregating all possible transaction types into a single, inefficient SNARK. This unlocks a new era of functionality and user experience on L2s.
  1. Improved Prover Efficiency and Reduced Operational Costs: For zk-Rollup operators, Gryphes offers a direct path to significantly enhance prover efficiency. By intelligently separating dynamic application logic from fixed cryptographic logic, the computational resources required for proof generation are optimized. This leads to faster transaction finality, higher throughput, and ultimately, reduced operational costs for running a zk-Rollup sequencer or prover network. Lower proving costs can also translate to lower transaction fees for end-users, improving economic viability.
  1. Scalability for Conditional Logic: Gryphes directly tackles the scalability bottleneck posed by "if and else" conditions in SNARKs. Defenders can now design systems where transaction logic can evolve and incorporate new features that rely on conditional execution, without fearing exponential increases in proving time. This modularity allows for greater agility in development and responsiveness to market demands, as new transaction types can be integrated more smoothly.
  1. Enhanced Security through Modularity: While not explicitly a security feature in terms of vulnerability patching, the modular nature of Gryphes can indirectly enhance security. By breaking down a large, complex SNARK circuit into smaller, specialized components, the task of auditing and verifying the correctness of each part becomes more manageable. This could potentially reduce the surface area for subtle bugs or vulnerabilities that might hide within monolithic, overly complex circuits. Each SNARK component can be independently optimized and potentially even formally verified, improving the overall integrity of the proof system.
  1. Broader Applicability of SNARKs: Beyond zk-Rollups, Gryphes expands the practical applicability of SNARKs to a wider range of use cases that inherently involve dynamic and conditional computations. This includes privacy-preserving identity systems, verifiable credentials, and complex enterprise blockchain solutions where logic often branches based on specific conditions. Defenders in these domains can now leverage the power of SNARKs for more intricate scenarios.
  1. Future-Proofing for Protocol Evolution: Blockchain protocols are constantly evolving. Gryphes provides a framework that can adapt to these changes more readily. If new cryptographic primitives or application features are introduced, they can be integrated as new "modules" or by updating specific SNARK components, rather than requiring a complete overhaul of a single, rigid SNARK circuit. This flexibility is crucial for long-term protocol maintenance and security.

In essence, Gryphes provides the tools for developers and defenders to move beyond basic, fixed computations in SNARKs, embracing the complexity of real-world applications while maintaining the efficiency and security guarantees that make SNARKs so powerful.

Key Takeaways

  • SNARKs struggle with conditional logic: Traditional SNARKs like Groth16 are highly inefficient when dealing with "if and else" conditions, forcing provers to compute all branches, leading to prohibitive costs for complex applications.
  • Gryphes offers a hybrid, modular solution: The framework intelligently combines different SNARK schemes, using flexible SNARKs (e.g., Plonk-like systems) for dynamic application logic and optimized SNARKs (e.g., Groth16) for fixed, heavy cryptographic proof logic.
  • Novel link protocol enables seamless composition: A crucial innovation is a link protocol that efficiently connects these disparate SNARKs with minimal overhead (only 2-3% of total proving time), ensuring constant-size proofs and constant-time verification.
  • Achieves high transaction throughput for complex dApps: Gryphes supports thousands of transaction types and demonstrates impressive performance, achieving up to 90,000 transactions per second in benchmark scenarios, making complex dApps like DEXs viable on zk-Rollups.
  • Expands SNARK applicability and improves prover efficiency: By overcoming the conditional logic bottleneck, Gryphes significantly broadens the practical use cases for SNARKs, enabling more feature-rich Layer 2 solutions and reducing operational costs for proof generation.
  • Open-source tools foster innovation: The provision of open-source components, including a "CP smart matrix to cut configuration," allows researchers and developers to build upon and integrate the Gryphes framework into future projects, accelerating advancements in SNARK-based systems.

About the Speaker(s)

The Gryphes project is a collaborative effort by researchers from The Hong Kong University of Science and Technology and OKG, focusing on cutting-edge advancements in cryptographic proof systems. Jiajun Xin, Samuel Cheung On Tin, Christodoulos Pappas, and Dimitrios Papadopoulos are affiliated with The Hong Kong University of Science and Technology, contributing their expertise to the theoretical and practical development of SNARKs and their applications. Yongjin Huang represents OKG, a prominent player in the blockchain space, bringing industry perspective and practical application insights to the research. Their collective work on Gryphes highlights a commitment to addressing fundamental challenges in SNARK scalability and efficiency, particularly in the context of zk-Rollups and decentralized execution, aiming to push the boundaries of what is possible with privacy-preserving technologies.

Reviews

Dr. Zero (Offensive Security Researcher) — SOLID

Gryphes tackles the absolute nightmare that is branching logic in Groth16 by just not using Groth16 for the branches. They duct-tape Plonk for the dynamic routing to Groth16 for the heavy crypto, and the real magic is getting the linking protocol down to a 1.5-second overhead. It's pragmatic, deeply technical cryptographic engineering that actually makes zk-Rollups usable for complex logic.

Heather Calloway (CISO) — WEAK

For most enterprise security teams, this deep-dive into cryptographic proving is safely skippable. However, if your business model relies on Web3 infrastructure, Gryphes presents a material leap in scaling zero-knowledge rollups by drastically reducing the compute cost of conditional logic.

→ Top-rated talks at Privacy Enhancing Technologies Symposium (PETS) 2026

All talks from Privacy Enhancing Technologies Symposium (PETS) 2026