Zecrey is a Layer 2 privacy protocol based on ZK-Rollup, in which all funds are held by smart contracts on the main chain, and calculations and storage are performed in Layer 2 at the same time. The validity of Layer 2 is guaranteed by a zero-knowledge proof.
Written by: Wang Yongzhe
Blockchain and privacy
As a trust solution in the information age, there is a certain contradiction between the transparency of blockchain technology decentralization and the privacy required by reality. Public and verifiable data on the chain means that data such as transactions are traceable and cannot be tampered with. At the same time, when interacting in the real world and the digital world, we inevitably leave some information, which also makes others It is possible to track information from transactions to real identity information.
All data stored on the chain is publicly verifiable, which is a fatal problem for blockchains and smart contracts. The lack of effective privacy protection is unacceptable in the real world, because not only individuals want to protect the privacy of their own property information and other private information, any business or organization also wants to keep their sensitive and valuable data confidential. At the same time, this is also contrary to the privacy and anonymity conceived at the beginning of Bitcoin’s design. Solving the privacy problem is the only way for the encryption industry.
Alex Gluchowski, the founder of Zksync, pointed out the pain points of solving privacy issues. Due to the following factors, it is extremely difficult to implement privacy protection on public blockchains:
- Privacy protection must be enabled by default as a complete protocol feature, to quote Vitalik Buterin: “Only a global anonymous collection is truly reliable and secure.”
- In order to enable privacy protection by default, the computational cost will increase significantly, but for privacy transactions to be practical, the cost must be very low.
- Privacy models must support programmability, because real-world use cases require more than just transfers: these privacy models also require account recovery, multi-signatures, payment limits, and so on.
Limitations of privacy agreements
At this stage, there are more and more blockchain projects focusing on privacy protection, but these projects also have different limitations.
Low-level design
In today’s blockchain network, there are two main ways to save transaction records: UTXO model and account model. Among them, UTXO model refers to unspent transaction output. Compared with the UTXO model, the account model has features such as programmability and flexibility. Most of the existing privacy protocols are designed based on the UTXO model. The UTXO model can record the collection of all unspent transactions in the blockchain for faster verification and parallel processing, but the model cannot perform complex logic operations and has poor programmability; while the account-based model has better performance Programmability and user-friendliness, but it is also difficult to protect privacy, because every time the relevant transaction is confirmed on the blockchain, the balance in the account is updated.
Secondly, a large part of the existing privacy schemes attempt to create their own public chain network, which is just a capital chain without any programming function. This type of privacy protocol is not compatible with existing blockchain networks, so it is not a general privacy solution. Considering the different underlying mechanisms, large numbers and diversified development of existing blockchain platforms, it is of great significance to construct a general privacy protocol that can be compatible with different blockchain networks.
Tool selection
Zk-SNARK “zero-knowledge Succinct Non-Interactive Arguments of Knowledge” has become a kind of zero-knowledge proof for many privacy-oriented blockchain applications due to its simplicity and efficiency. Nevertheless, Zk -SNARK has an inherent shortcoming: that is, it is a resource-intensive technology. This problem makes the existing protocols unable to achieve end-to-end privacy protection, because ordinary users are always limited by computing resources.
The Zether protocol is a confidential payment mechanism compatible with Ethereum and other smart contract platforms. It is also the first feasible solution to protect transaction privacy based on the account model. Zether establishes a private transaction model through smart contracts to achieve private transactions. However, Zether’s privacy transaction fees are too high (transfer transactions consume 718.8W Gas), the amount of transaction data is too large (transfer transactions 1472 bytes), which is impractical in daily use scenarios, and the solution itself has flaws. Zether only Support one-to-one private transactions, the same user can only send one transaction in the same round. These defects will greatly limit the availability of the protocol and affect the performance of the system.
Faced with the above-mentioned shortcomings, the Zecrey team believes that designing a universal and extensible protocol to protect the privacy of accounts and transactions in the smart contract world is still an urgent problem to be solved. In the era when the blockchain is booming, there are hundreds of blockchain networks, and the development of a new Layer1 privacy blockchain is not competitive enough. In the long run, designing a universal Layer 2 protocol to provide protection of account privacy and transaction privacy, bridging different blockchain networks in a scalable and lightweight manner, will have a more profound impact on the development of the blockchain universe .
Zecrey proposed that a general privacy protocol needs to meet the following requirements:
- Privacy protection: The agreement not only needs to protect the balance and address of the blockchain account, but also needs to protect the transfer amount and the relationship between the parties to the transaction from being exposed. This is the most important function.
- Programmability: This is the basic requirement for designing a blockchain protocol, and complex application logic and rules can be mapped to the blockchain through smart contracts.
- Scalability: In order to be applicable to scenarios with a large number of clients, the proposed protocol should be able to meet the scalability requirements to avoid service congestion or system crash due to network bandwidth, storage burden, computing load, protocol topology, etc.
- Lightweight: This is a specific requirement of the Layer 2 protocol. As the transaction fees of mainstream blockchain networks such as Ethereum and BSC become more and more expensive, the use of the Layer 2 protocol is becoming more and more difficult. In order to attract users and lower the threshold, the protocol needs to reduce resource-intensive computing tasks and interaction costs.
- Cross-chain: With the emergence of more and more blockchain projects, privacy protocols should allow developers to transfer assets from one to another to ensure the usability and sustainability of services.
Breaker-Zecrey Protocol
What is Zecrey?
Zecrey Protocol is a universal and scalable Layer 2 protocol that can bring privacy protection for asset transactions. Zecrey is composed of an experienced and creative team that aims to solve the key and growing privacy issues related to the blockchain, including transaction privacy and account privacy. The agreement creates a novel privacy transaction model-supporting one-to-many transactions without increasing transaction costs.
Specifically, Zecrey is based on the Layer 2 privacy protocol of ZK-Rollup. ZK-Rollup is a Layer 2 expansion solution, in which all funds are held by the smart contract on the main chain. At the same time, it performs calculation and storage in Layer 2. The effectiveness of Layer 2 is guaranteed by zero-knowledge proof. While providing transaction privacy protection, ZK-Rollup greatly reduces handling fees and improves performance. In addition, Zecrey uses an account-based model to provide users and developers with programmability and flexibility.
In terms of product functions, Zecrey currently appears as an all-in-one plug-in wallet that supports multi-chain networks, and can manage multi-chain assets in one account. For example, Zecrey Wallet can be connected to different blockchain networks and can help users manage assets stored on different blockchains. At the Layer2 level, Zecrey specifically supports the concept of aggregated assets. As shown in the figure below, 1ETH on Ethereum and 2ETH on Near, after they are deposited into Zecrey’s L2, all users can see is 3ETH. And Zecrey supports users to withdraw the 3ETH to any supported public chain.
As an aggregator of Layer1 and Layer2, Zecrey aggregates different chains in a completely decentralized manner. Therefore, users no longer need to care about which chain the assets are on. Through the Zecrey plug-in wallet, various assets can be managed safely and easily. In terms of privacy protection, Zecrey brings users a second-level privacy experience, and through unique product design, cleverly presents the complex logic behind it to users in an intuitive way, so that users can easily switch to Layer 2 and assign assets And transaction privacy, to help users realize one-click Layer 1 private transfers. At the same time, Zecrey can also support Layer 2’s privacy cross-chain swap, and users can implement cross-chain swaps between any assets in any chain on Zecrey.
Zecrey privacy cross-chain bridge
With the increase in the number of various public chains and Layer 2 solutions (such as Arbitrum, Optimism), the demand for asset cross-chain has also grown rapidly, and various cross-chain bridge tools have become one of the necessary tools for users. “It is customized to realize the transfer of mainstream cryptocurrency in personal accounts, and the complexity of the transfer process also greatly increases the difficulty of realization. In addition, transaction operations including transfers and token exchanges are subject to the non-interoperability between chains and lack of cross-chain interoperability, which also highlights the current bottleneck of cross-chain asset management. More importantly, the privacy of cross-chain assets should be maintained in a universal and efficient way.
In response to these problems, Zecrey has achieved interoperability between different blockchains through a new cross-chain solution, and supports the transfer of cross-chain private assets in a safe and decentralized manner. With ZK-Rollup, Zecrey has realized a lightweight, efficient and advanced cross-chain asset management and privacy protection protocol.
Zecrey has broken the challenges of the current blockchain ecology. Specifically, Zecrey has implemented a cross-chain privacy protocol with two main goals-to achieve a bridge-based infrastructure between any two chains, and to achieve the exchange of private assets between any blockchain network. The core idea is to use Layer 2 for state management and Layer 1 to ensure asset security in a completely decentralized manner. Zecrey is a multi-chain asset management wallet operated by ZK-Rollup.
Zecrey aggregates the transaction state into Layer2 and updates the same final state on each Layer1. The status update is maintained by ZK-Rollup, which has the same level of decentralization and security as Layer1. In addition, Zecrey uses an account-based model to provide users and developers with programmability and flexibility.
The main innovations and advantages of Zecrey’s privacy cross-chain solution:
- Zecrey realizes one-to-many private transactions, which is a creative measure to improve transaction performance. In addition, Zecrey implements one-click private transfers at the Layer1 level.
- Zecrey is a universal cross-chain privacy protocol based on the account model.
- The number of privacy transactions per user in each round of Zecrey wallet is no longer limited. At the same time, through ZK-Rollup, Zecrey can provide lower handling fees, higher security levels, higher TPS and second-level cross-chain exchanges.
- Zecrey uses a composite zero-knowledge proof (zk-proof) to improve the performance of the protocol. Through this technology, millisecond-level privacy proof can be achieved.
- Zecrey achieves interoperability between arbitrary blockchains through cross-chain bridges, and supports the exchange of cross-chain privacy assets.
- Zecrey is a decentralized asset aggregator in Layer 1 and Layer 2, which realizes the aggregation of similar assets for users, and can realize the free flow of assets through cross-chain bridges, and provides users with intuitive asset management views.
Privacy AMM DEX
Zecrey wallet has a built-in AMM DEX-Zecrey Swap. Zecrey Swap can achieve all the things that the existing Layer 1 Swap project can do, including permissionless liquidity provision, pledge, mining, etc. In addition, Zecrey Swap has the following unique features.
- Zecrey can not only achieve cross-chain privacy, but also guarantee privacy.
- Order model, the existing AMM DEX, such as Pancake Swap or Uniswap, if the user wants to complete a transaction, the user must do it online, and cannot place a limit order like a centralized exchange. Zecrey can help users still achieve this function under the AMM model. Users can place orders on Zecrey, and this order is completely private. Once the order requirements are met, the Layer2 system will automatically help match them.
- Zecrey is very different from the current Relay-based cross-chain projects, such as PolyNetwork. Zecrey is implemented based on zk-rollup, so it can achieve Layer 1 level of security. Because all Swap transactions are implemented based on Layer 2, transaction confirmations are all milliseconds.
In addition, Zecrey can also solve a very troublesome problem at present: the MEV problem, or the problem of running away. Zecrey can fully prevent MEV, unlike other Layer 2 which relies on low latency to partially prevent MEV.
First of all, Zecrey is a Layer 2 project, and low latency can naturally resist MEV. Secondly, Zecrey has privacy. The amount of each transaction is encrypted according to the public key, and only the user knows the details of the transaction. Finally, Zecrey has a fair sorting service. Zecrey’s mempool is a first-in-first-out (FIFO) queue, which is related to the generation of privacy certificates, and every transaction must be executed in order. All transactions in Zecrey can completely prevent MEV operations.
Summarize
Privacy is one of the important basic issues of the entire industry. A highly decentralized blockchain combined with a well-designed cross-chain and privacy solution will produce a huge network effect. It can be foreseen that Zecrey will be the breaker to solve the current privacy dilemma in the future. Will have a broader application space.
Disclaimer: As a blockchain information platform, the articles published on this site only represent the author’s personal views, and have nothing to do with the position of ChainNews. The information, opinions, etc. in the article are for reference only, and are not intended as or regarded as actual investment advice.