Zecrey Protocol: Keep Privacy in the Smart Contract World

Zecrey Protocol
5 min readMay 25, 2021

--

With the prosperous development of blockchain technology and DeFi projects, the privacy issues related to clients’ assets and identities have gained significant interest. Essentially, account privacy and transaction privacy are the core compositions of the privacy topic in the blockchain. Account privacy represents the requirement that the balance and address of the blockchain account are well-hidden while transaction privacy means the protection of the transaction amount and the relationship between the parties to the transaction.

During the past few years, many blockchain projects focusing on privacy protection have burst out. However, these projects have presented various limitations, which greatly hindered the standardization of privacy protocols for blockchain. First, most existing privacy protocols are designed based on UTXO model. The UTXO model records the set of all unspent transactions in the blockchain for quicker verification and parallel processing. However, it can not perform complicated logic and has poor programmability. Although the account-based model has better programmability and is more user-friendly than the UTXO model, it is also difficult to preserve privacy for the account-model blockchain since the balance in the account will be updated whenever a relevant transaction is confirmed on the blockchain. Second, a large proportion of existing privacy schemes aims to create their own blockchain, which is a cash chain without the feature of programmability. This type of privacy protocol can not adapt to existing blockchain networks and thus is not a general privacy solution. Taking the heterogeneity, magnanimity, and diversity of the existing blockchain platforms into consideration, it is of great significance to propose a general privacy protocol that can adapt to various blockchain networks. In addition, ZK-Snark is exploited in most of the existing privacy protocols.

Nevertheless, ZK-Snark shows an inherent drawback that it is a type of resource-intensive technology. This trouble makes the existing protocols unable to achieve end-to-end privacy because ordinary users are always constrained by computing resources. Zether is the first feasible solution based on the account model for protecting transaction privacy. Zether uses smart contracts to complete the privacy transaction model and achieves private transactions based on ElGamal Encryption, One-out-of-Many Proofs, and BulletProofs-drived Sigma. However, experiments have proved that the fees for private transactions in Zether are too expensive (the transfer transaction consumes 718.8W Gas) and the amount of transaction data are too huge (the transferred transaction is 1472bytes), which makes Zether unpractical in real-world scenarios. There are also flaws in the solution itself. Zether only supports one-to-one private transactions, and the same user can only send one transaction in the same round. These defects will greatly limit the protocol availability and affect the performance of the system.

According to the above analysis, designing a general and scalable protocol for preserving both account and transaction privacy in the smart contract world is still a problem that needs to be solved urgently. However, this is an ear of chain explosion, where exists hundreds of blockchain networks, making it unreasonable to develop a new layer-1 privacy blockchain. From a long-term perspective, designing a general layer-2 protocol that provides both account privacy and transaction privacy and bridges different blockchains in a scalable and lightweight way would exert a more profound influence on the development of blockchain, which is just our vision. In conclusion, a general privacy protocol needs to meet the following requirements.

  • Privacy-preserving: The proposed protocol needs to protect not only the balance and address of the blockchain account but also the transferring amounts and the relationship between the parties to the transaction from being exposed. This is the most significant requirement.
  • Programmable: This is the basic requirement for designing blockchain protocols, which enables complex application logic and regulations to be mapped onto blockchain through smart contracts.
  • Scalable: To adapt to the scenarios with huge amounts of clients, the proposed protocol should satisfy the scalability requirement to avoid service congestion or system crashes due to network bandwidth, storage burden, computing load, protocol topology, etc.
  • Lightweight: This is a unique requirement for layer-2 protocols. Since the transaction fee becomes more and more expensive in the mainstream blockchain networks, such as Ethereum and BSC, it is getting harder for the public to use layer-2 protocols. To attract users and reduce the threshold, the protocol needs to decrease the resource-intensive computation tasks and the interaction costs.
  • Cross-Chain: As there are more and more blockchain projects coming forth, the privacy protocol should enable the developers to migrate the assets from one to another, so as to guarantee service availability and sustainability.

To meet the aforementioned requirements, we propose Zecrey, a general and scalable layer-2 protocol that brings privacy for transaction assets. As far as we know, this is the first end-to-end privacy protocol that satisfies all of the above requirements at the same time. Specifically, Zecrey is a layer-2 privacy protocol based on ZK-Rollup. ZK-Rollup is a layer-2 scaling solution in which all funds are held by a smart contract on the main chain, while it performs computation and storage off-chain where the validity of the side chains is ensured by zero-knowledge proofs. While providing transaction privacy, ZK-Rollup greatly reduces handling fees and improves performance. Besides, Zecrey adopts an account-based model, which provides programmability and flexibility for both users and developers. The main innovations of Zecrey are summarized as follows.

  • Zecrey is a general privacy protocol based on the account model.
  • Zecrey enables both one-to-many and many-to-many private transactions, which is a creative move.
  • The number of transactions for users in the same round is no longer restricted, leading to high TPS of the protocol.
  • Composite zero-knowledge proofs are utilized to provide high performance for the protocol. Through this technology, the protocol can realize the millisecond-level computing privacy proof on the mobile phone, which reflects the superior practicality of Zecrey.
  • Zecrey supports cross-chain privacy transactions, thus can adapt to numerous blockchain networks.
  • Through ZK-Rollup, Zecrey can achieve lower handling fees and higher TPS.
  • We design lightweight on-chain contracts, so as to make the protocol easy and cheap to migrate.
  • Zecrey provides a private method to control the data flow in the blockchain network.

Thus, Zecrey will be an outstanding choice if you want to achieve privacy for your account or your assets in the transparent blockchain world, which would bring you an extremely fantastic experience. Have a try and you will fall in love with Zecrey!

Zecrey official website is live now: Zecrey

Welcome to join our communities and follow us on twitter:

Medium:https://medium.com/@zecrey
Twitter: https://twitter.com/zecreyprotocol
Telegram: https://t.me/zecrey
Discord: https://discord.com/invite/U98ghQsJE5

--

--

Zecrey Protocol
Zecrey Protocol

No responses yet