The Zecrey Protocol: Maintaining Privacy in the Smart Contract World

Albert Inim
5 min readFeb 2, 2022

With the successful development of blockchain technology and DeFi initiatives, the privacy of customers’ assets and identities has attracted major attention. Account privacy and transaction privacy are the two main components of the blockchain’s privacy concern. Account privacy refers to the need that the blockchain account’s balance and address to be kept private, whereas transaction privacy refers to the protection of the transaction amount as well as the connection between the participants to the transaction.

Many blockchain initiatives concentrating on privacy protection have sprung up in recent years. However, these efforts have exhibited a number of flaws, which have significantly hampered the standardization of blockchain privacy protocols. To begin, the majority of existing privacy mechanisms are based on the UTXO concept. For faster verification and parallel processing, the UTXO model stores the set of all unspent transactions on the blockchain. However, it is unable of doing complex reasoning and has limited programmability. Although the account-based model is more programmable and user-friendly than the UTXO model, maintaining privacy for the account-model blockchain is problematic since the balance in the account is updated anytime a relevant transaction is confirmed on the blockchain.

Second, a big number of existing privacy schemes seek to build their own blockchain, which is just a currency chain without the capacity to be programmed. Because this form of privacy protocol cannot be adapted to current blockchain networks, it cannot be used as a generic privacy solution. Considering the heterogeneity, magnanimity, and variety of current blockchain platforms, it is critical to offer a generic privacy protocol that can adapt to multiple blockchain networks. Furthermore, ZK-Snark is used in the majority of extant privacy methods.

Nonetheless, ZK-Snark has the inherent disadvantage of being a resource-intensive technique. Because ordinary users are continually bound by computational resources, current protocols are unable to ensure end-to-end privacy. Zether is the first viable approach for safeguarding transaction privacy based on the accounting concept. Zether completes the privacy transaction model with smart contracts and accomplishes private transactions based on ElGamal Encryption, One-out-of-Many Proofs, and BulletProofs-driven Sigma.

Experiments have shown, however, that the costs for private transactions in Zether are too high (the transfer transaction uses 718.8W Gas) and the quantity of transaction data is too large (the transmitted transaction is 1472bytes), rendering Zether unsuitable for use in real-world circumstances. The solution itself has faults as well. Zether only supports one-to-one private transactions, and a single user may only submit one transaction every round. These flaws will severely limit protocol availability and negatively impact system performance.

According to the preceding research, developing a universal and scalable mechanism for protecting both account and transaction privacy in the smart contract environment remains an important topic. However, we are in the midst of a chain explosion, with hundreds of blockchain networks, making it impractical to create a new layer-1 privacy blockchain. Long-term, building a generic layer-2 protocol that ensures both account and transaction privacy and links disparate blockchains in a scalable and lightweight manner would have a more significant effect on blockchain development, which is precisely our vision. Finally, a generic privacy protocol must fulfill the following characteristics.

  • 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 required 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 address the aforementioned criteria, we offer Zecrey, a generic and scalable layer-2 protocol that provides transaction asset privacy. As far as we know, this is the first end-to-end privacy protocol that meets all of the conditions listed above at the same time. Zecrey, in particular, is a layer-2 privacy protocol based on ZK-Rollup. ZK-Rollup is a layer-2 scaling method in which all money are maintained by a smart contract on the main chain while computation and storage are performed off-chain, with the validity of the side chains assured by zero-knowledge proofs.

ZK-Rollup minimizes handling fees and increases speed while providing transaction anonymity. Furthermore, Zecrey has an account-based paradigm, which gives both users and developers programmability and flexibility. Zecrey’s significant innovations are mentioned here.

  • 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.

As a result, Zecrey is an excellent alternative if you want to attain privacy for your account or assets in the transparent blockchain environment, which will provide you with an exceptionally great experience. Give it a go, and you’ll fall in love with Zecrey!

You can also visit the Zecrey website now at : Zecrey

Also Join the Zecrey community to stay updated on different platforms below

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

--

--