Zecrey Onepager

System Architecture

What problems does Zecrey try to solve?

Zecrey mainly dedicates to tackling two significant problems that exist in the blockchain system: privacy and isolation. We can use the following key points to summarize Zecrey: privacy, generalized cross-chain bridge, and cross-chain swap.

What role does zk play in Zecrey?

Zecrey is a zk-zk-rollup solution. The user generates privacy proof by zk in the client end. After sending the transaction to zecrey layer2, the layer2 network uses zk-rollup for transaction expansion. The second one is the zk-rollup commonly mentioned by the public.

Comparison between Zecrey and AZTEC in terms of privacy algorithms and trade-off

Zecrey is based on Sigma protocol, and AZTEC is based on zk-snarks for privacy part that causes generating privacy proof from Zecrey to be much faster than AZTEC. The trade-off here is that, for example, constraints are the most important part of the circuit of zk-rollup(will affect the total transactions in one layer-2 block), the maximum constraints for bn254 curve is

$2^{28}$

. In the past, most academics think that it's not practical to do algebraic algorithms in the circuit. It used to take 25-30K constraints for one ECC scalar multiplication in the circuit. That's quite unpractical. But right now based on the baby jubjub curve(which is a friendly curve for ECC operations in the circuit), it only takes 4.5K constraints for one ECC scalar multiplication in the circuit. (no optimization result). Based on UltraPLONK and TurboPLONK, it can be reduced to near 1K. ECC scalar multiplication operations are the most important part of algebraic algorithms, especially Range Proof. It only takes 450K constraints for the range proof in the circuit(no optimization). So one transaction, for example, Transfer Transaction(1 to 2) will cost 3 range proofs and some basic operations, nearly 1.5M constraints. It means that right now we can support nearly 130 transactions in one layer-2 block. The trade-off is this part. For AZTEC, they may support 500-1000 transactions. But if we take UltraPLONK and TurboPLONK for optimizations, it will be scaled to at least 4-5 times larger(500-800 transactions). This is not a problem even though we can only support 130 transactions in one block as we can construct a prover-network to address the problem.Zecrey's cross-chain solution

Zecrey achieves cross-chain through multi-chain rollup smart contracts and aggregated assets.

Zecrey deploys rollup smart contracts on multiple chains, and users deposit assets into the rollup contracts to enter Zecrey Layer2. Among them, the rollup contract itself cannot transfer or withdraw a user's assets(this is a natural feature of zk-rollup and is guaranteed by zk-snarks).

Zecrey layer-2 Network directly converts deposit transactions in multi-chain rollup contracts into aggregated assets. For example, user A deposits 1 ether from Polygon and 2 ethers from Ethereum, then user A will have 3 ethers in Zecrey. Due to aggregated assets feature of Zecrey, the rollup smart contracts will record all transactions that affect the state of layer-2.

The only question is: how to ensure that the state of the layer2 block in multi-chain contract is synchronized? Due to the maintenance of the same layer2 state in the multi-chain contract, l1 will have a different confirmation time. Zecrey will ensure that Ethereum is the most stable chain in maintaining the state of layer2, which means that Ethereum is the fastest chain updating zecrey layer2 states. The Relayer network will synchronize other chains after the layer-2 block of the Ethereum contract is updated. For example, if Ethereum synchronizes to 100 blocks of layer2, the Relayer network will synchronize other chains to 100 blocks at most, although their confirmation time may be shorter.

Last modified 26d ago