tl;dr: A recently proposed TZE for native L2s would enable smart contracts on Zcash, but it comes with unsolved challenges around censorship resistance and liquidity fragmentation. We propose a more generic interface that would additionally support bridging. It would not only pave the path for programmability but also allow Zcash to tap into the liquidity of Ethereum with no trust assumptions. The proposed TZE is based on the existing Halo2 proving system, which is a strictly safer choice than the introduction of any new cryptographic primitive.
Introduction
Hello everyone, I’m Igor from Matter Labs (the core dev team of ZKsync). Our philosophy and values are closely aligned with the mission of Zcash.
We have followed a recent community discussion regarding the possibility of L2s on Zcash (1, 2, 3) with great interest. The ideas proposed by Abdel and the Starkware team are very interesting, and we would like to contribute to this conversation. In this post, we present a proposal that extends these ideas with a more generic approach.
The proposals discussed so far focus on minimizing consensus surface area. This post focuses on a complementary question: what trust assumptions remain at the system level once such a verifier exists, and whether those assumptions are acceptable for Zcash.
Potential L2 issues
The existing L2 landscape in Ethereum has two main problems today: liquidity fragmentation and censorship resistance. Both are being actively worked on with a lot of research and progress, but neither is universally solved. Our concern is that if the introduction of L2s will not be done carefully with respect to these problems, it can negatively affect the Zcash ecosystem.
Liquidity fragmentation
Unless the implementation is restricted enough to only allow a single L2 instance, there will likely emerge multiple L2s on Zcash. In Ethereum right now, there is a cluster of L2s that offer different use cases and trade-offs. Multiple leading L2s (e.g., ZKsync, Optimism, Arbitrum) are offering solutions to easily launch your own L2. The demand for this is also increasing, with the rise of AppChains.
This brings a problem: given that any amount of asset bridged to a particular chain becomes locked on the original chain, the overall liquidity becomes diluted across different chains. To solve this problem, a lot of effort in Ethereum is currently focused on cross-chain interoperability, which is meant to allow accessing funds regardless of the chain they’re bridged to. An example of such research is RIP-7755, but in general, to the best of my knowledge, all existing efforts assume some kind of stateful router implementation, which could be hard to implement in Zcash.
Censorship-resistance
Another issue is that while most L2 implementations are now secure enough to guarantee that funds cannot be stolen by a malicious operator, censorship resistance (e.g., the ability of the operator to freeze funds) still remains a problem. None of the top 15 rollups has achieved Stage 2 status on L2Beat, indicating that trust is still a requirement in the modern L2 landscape. Again, while a lot of work is being done here and more chains are introducing additional security guarantees, this is still a work in progress.
On Ethereum, additional protection measures are being regularly added on top of the base protocol to make it work (e.g., upgradeability restrictions, security councils, TEE verification, etc.), but on Zcash this can be problematic, since support for L2s has to be added at the consensus level, so changing the system will likely require changes to the core protocol.
Proposed solution
We propose introducing an abstraction that would generalize the multi-chain ecosystem for Zcash: instead of introducing an abstraction for implementing a rollup, we can introduce an abstraction for implementing a bridge as well.
This abstraction will exist as a TZE, for which public inputs (e.g., precondition/witness) would represent a state transition of two chains: the bridged network and Zcash itself.
This way, given a chain with already implemented censorship resistance and interoperability mechanisms, we can develop a single provable program to ensure the correctness of execution of both chains. As a result, we will be able to rely on the second chain to enforce the above-mentioned properties:
- If it is possible to enforce censorship resistance on the second chain, we can guarantee that no user will be denied exit back to Zcash without implementing additional protection measures in Zcash itself. Basic requirements for that are:
- The second chain is sufficiently decentralized, with no single entity controlling block creation
- The consensus mechanism of the second chain can be efficiently verified via a ZK proof
- Exit requests initiated from the second chain are ordered, meaning that ignoring an exit request would cause the bridge to halt. This guarantees that even in an absolute worst-case scenario, where the decentralized network itself becomes malicious enough to censor a particular bridge user, intervention from the Zcash community is possible to fork the chain state and resurrect the bridge, allowing users to exit.
- If the second chain has an implementation of interoperability functionality, then interoperability can be reused via bridging to the second chain. An interoperability layer no longer becomes a requirement for the Zcash protocol itself.
- Since it’s a generalization, we can still represent an L2 through it if that is the goal. For a rollup, information about the Zcash consensus is still trivially accessible.
Rough outline of the proposed TZE
The exact TZE specification is to be defined; we need the community’s input for that. However, there are some basic properties that certainly need to be present.
- “Genesis”/”Create” mode: TZE output used to initialize a TZE. During the creation, we need to specify the initial properties for the STF, including (most importantly) a unique identifier of an STF. This is required to correctly match deposits to a concrete TZE instance.
- “Deposit” mode: TZE output used to lock funds being deposited. The TZE must have a value attached and can only be consumed by the corresponding STF TZE.
- “STF” mode: A representation of the transition of the STF from state A to state B. It can consume deposit outputs provided that they match the STF ID, and can produce transparent UTXOs for withdrawals. The STF precondition must contain state roots for two chains, and the provided witness must be used to verify that ZK proof produces expected root hashes for both chains.
- (Optional) “Force withdrawal” mode: Provides the ability to request an operation to be performed on the destination chain; if this request is ignored, this TZE output can be used to switch the STF into a withdrawal-only mode, where the only kind of transaction that can be processed is force withdrawals. Note that this is a hard requirement for any chain with low censorship resistance guarantees (e.g., ZK rollups with a single block producer), since even with unrestricted STF submissions, a single censored user might not have enough computational power to outcompete the censoring operator (assuming that only some operations are censored).
Proving system
Another point we would like to discuss is the proving system chosen for the TZE. A previous proposal uses Circle STARKs and provided an overview comparing this option to RISC-V.
Disclosure: Matter Labs uses a proving system that is based on RISC-V (airbender).
However, we believe that adding a new proving system to the Zcash implementation may not be necessary, given that Zcash already has an integrated native proving system: Halo2.
Adding a new proving system would increase the number of potential failure points in the system; for example, a bug can exist either in Halo2 or the verifier used in the TZE. Instead, we could require that the state transition have a valid Halo2 proof, which would limit the overall complexity of the proposal. This way, the only remaining failure case would be a bug in Halo2 itself, which would have drastic consequences outside the scope of the TZE anyway.
This should not be limiting for implementations, since thanks to recursive verification we can “adjust” the type of proof: the underlying system can use Circle STARKs, airbender, SP1, or anything else, and the resulting proof can be “wrapped” into a Halo2 proof, similarly to what many rollups do in the Ethereum ecosystem when wrapping FRI proofs into a SNARK for Ethereum verification.
Isn’t just having TZE for verifying ZK proofs enough?
In theory, implementing either a bridge or a rollup is possible using a single-mode TZE, but we believe that this would introduce trust assumptions that are unacceptable:
- Without a way to lock deposited funds, the deposit process becomes trusted (e.g., a UTXO must be spendable by the STF TZE, but there are no consensus-enforced rules ensuring that the deposit will actually be faithfully processed).
- Without consensus-level logic to form public inputs for circuit verification, the possibility of malicious STF operator behavior increases. If the requirements for a valid STF transition, as well as rules for upgradeability and exit windows, are enforced at the consensus level, users of any particular STF gain additional security by default; these constraints are outside the control of the STF operator.
- If we are considering a rollup or bridge to a network without strong censorship resistance guarantees, the network must provide a way to request a force withdrawal from L1 (Zcash) that would require the STF to process this operation in order to continue functioning. Without this mechanism, achieving a censorship-resistant implementation of the STF is impossible, which would open the possibility of freezing user funds.
Proposed bridge: Ethereum
Given the above, we would like to propose the first implementation of this TZE: a trustless bridge to Ethereum. If this proposal is accepted, Matter Labs is committed to providing a production-ready implementation for the Zcash community.
We believe that Ethereum is a good candidate (compared to a dedicated L2), because:
- It provides sufficient censorship resistance guarantees, being decentralized with no single block producer. Thus, for Ethereum, the forced withdrawal mechanism is optional, which simplifies the overall design.
- Its consensus can be efficiently verified using existing technology, making it possible to deliver a working implementation faster.
- An established ecosystem exists for transparent ZEC use cases (e.g., DeFi), covering any functionality an L2 can provide (assuming transparent pools).
- The interoperability ecosystem is very active, which helps ensure that ZEC liquidity is not overly fragmented.
Probably the most controversial point here is the actual censorship resistance of Ethereum; however:
- The current state of censorship resistance on Ethereum is strictly better than on any existing L2, whether Ethereum-native or potential Zcash-native. Additionally, Ethereum is actively working on improvements in this area, e.g. EIP-7805, which is scheduled for inclusion in the next hard fork.
- Even in the case of censorship on Ethereum, it is still possible to recover the bridge by hard-forking the Ethereum state and creating a new chain using a state snapshot as the genesis state. This would require community intervention and consensus-level adjustments, but this is a worst-case scenario, and the key point is that even then, ZCash users remain safe.
We are ready to discuss this topic in greater detail if required.
Prototype implementation
We have prepared a proof of concept for this architecture.
You can find it here: https://github.com/matter-labs/zcash_eth_bridge
It provides a very basic implementation of a bridge to Ethereum, allowing funds to be bridged from the Zcash network to Ethereum (where they are minted as an ERC-20 token) and back. The project includes a demo showcasing the flow, as well as links to all technical details of the implementation.
Caveats
This proposal has three main caveats:
- It targets the transparent pool only. Shielded pools are explicitly out of scope, which is hopefully acceptable; given the Tachyon efforts, introducing additional complexity there is probably undesirable.
- The problem of multiple instances still exists. While multiple L2s can exist in parallel without affecting each other, multiple bridges to the same network will result in multiple versions of bridged tokens on the target network. This means the community will likely need to select a “preferred” bridge and be involved in its governance.
- ZIP 227 (shielded assets) is not covered in this proposal, although it should not introduce significant additional complexity.
Conclusion
We would like to hear community feedback on the following:
- What do you think about the idea of a generic TZE optimized for bridging purposes that can still be used to implement an L2?
- What do you think of Ethereum as a potential target chain for the first trustless bridge?
- What do you think about using Halo2 as the proving system for this TZE?
Otherwise, if you have any questions, I’ll be happy to answer.


