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
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(h^1_1\)
\(h^1_2\)
\(h^1_3\)
\(h^1_4\)
\(h^2_1\)
\(h^2_2\)
\((ii)\) Send \(N\) ETH to contract \(\mathcal{C}\) which adds \(C_1\) to the Merkle tree
\(h^3_1\)
\(C_1\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(h^1_1\)
\(h^1_2\)
\(h^1_3\)
\(h^1_4\)
\(h^2_1\)
\(h^2_2\)
\((ii)\) Send \(N\) ETH to contract \(\mathcal{C}\) which adds \(C_1\) to the Merkle tree
\(h^3_1\)
\(C_1\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(h^1_1\)
\(h^1_2\)
\(h^1_3\)
\(h^1_4\)
\(h^2_1\)
\(h^2_2\)
\((ii)\) Send \(N\) ETH to contract \(\mathcal{C}\) which adds \(C_1\) to the Merkle tree
\(h^3_2\)
\(h^3_1\)
\(C_1\)
\(C_2\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(h^1_1\)
\(h^1_2\)
\(h^1_3\)
\(h^1_4\)
\(h^2_1\)
\(h^2_2\)
\((ii)\) Send \(N\) ETH to contract \(\mathcal{C}\) which adds \(C_1\) to the Merkle tree
\(h^3_3\)
\(h^3_1\)
\(h^3_2\)
\(C_1\)
\(C_2\)
\(C_3\)
\(C_4\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(h^1_1\)
\(h^1_2\)
\(h^1_3\)
\(h^1_4\)
\(h^2_1\)
\(h^2_2\)
\((ii)\) Send \(N\) ETH to contract \(\mathcal{C}\) which adds \(C_1\) to the Merkle tree
\(h^3_5\)
\(h^3_1\)
\(h^3_2\)
\(h^3_3\)
\(h^3_4\)
\((i)\) Select a withdrawal address \(A\)
\((ii)\) Select a root \(R\) among the stored ones and compute opening \(O(l)\) w.r.t \(R\)
\((iii)\) Compute nullifier hash \(h= H(k)\)
\((iv)\) Compute a proof using Groth16 proof system s.t. :
\((v)\) The contract verifies the proof and uniqueness of the nullifier hash.
If that succeeds, the contract transfers \(N\) ETH to \(A\).
\(C_1\)
\(C_2\)
\(C_3\)
\(C_4\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(H(0)\)
\(h^1_1\)
\(h^1_2\)
\(h^1_3\)
\(h^1_4\)
\(h^2_1\)
\(h^2_2\)
\(h^3_5\)
Anonymity | ||
Non-custodial | ||
Variable amounts | ||
Shielded payments | ||
ZK Rollup | ||
Proof system |
\(^{\dagger}\) Concerns with Tornado.cash: https://lightco.in/2019/08/07/tornado-review/
Groth16
PLONK
\(^{\ddagger}\) Theoretically, ZK Rollups with Groth16 is possible. Loopring uses Groth16 with ZK Rollups.
\(\dagger\)
\(\ddagger\)