Consensys / anonymous-zether

A private payment system for Ethereum-based blockchains, with no trusted setup.
Other
294 stars 73 forks source link

Creating a private payment system for Ethereum-based blockchains with no trusted setup involves combining various cryptographic techniques to ensure privacy and security. Here's a high-level overview of the steps you could take: #72

Open SAGZA opened 1 month ago

SAGZA commented 1 month ago

Example WorkflowTransaction Creation:The user creates a transaction using their private key. The transaction includes the destination address and the amount, but these are encrypted using zk-SNARKs or zk-STARKs.Proof Generation:Generate a zero-knowledge proof that the transaction is valid without revealing the sender, recipient, or amount.Transaction Submission:The transaction and proof are submitted to the Ethereum network. The network verifies the proof and, if valid, processes the transaction without knowing the details.Mixing:The transaction can be sent to a mixer to further obfuscate the origin. The mixer uses zero-knowledge proofs to ensure that funds are not stolen or lost during the mixing process.Confidentiality:Use confidential transaction techniques to hide the transaction amounts. This can be done through cryptographic commitments that allow for verification without revealing the actual amounts.Layer 2 Execution:Execute the transaction on a Layer 2 solution to increase efficiency and reduce gas costs. Only the final state is committed to the Ethereum mainnet, ensuring privacy and scalability.Implementation ConsiderationsSmart Contracts: Develop smart contracts that handle transaction processing, proof verification, and mixing. These contracts must be thoroughly audited to ensure security and correctness.User Experience: Create user-friendly interfaces and wallets that simplify the process of creating, submitting, and verifying transactions.Regulatory Compliance: Ensure that the system complies with relevant regulations, which may vary depending on the jurisdiction.Tools and LibrariesCircom: A circuit compiler that can be used to generate zk-SNARKs.ZoKrates: A toolbox for zk-SNARKs on Ethereum.Tornado Cash: An example of a mixer that can be adapted or extended.OpenZeppelin: Provides secure smart contract templates and libraries.zkSync: A Layer 2 scaling solution using zk-Rollups.