Zero-knowledge proof (ZKPs) distributed ledger network

Zero-knowledge proof (ZKPs) distributed ledger network


Application of zero-knowledge proof:


Technical background: DLNs such as blockchain networks sacrifice a certain degree of privacy due to their transparency, making the private information of transaction participants easy to leak.

Solution: Adopt zero-knowledge proof (ZKPs) technology to allow transactions to be verified without revealing specific details, thereby protecting transaction privacy.


Preventing transaction tracking:


Goal: Prevent the tracking of transaction details (such as the identity of transaction participants) through ZKPs, especially by analyzing transaction fees (such as "gas" fees) to track the identity of participants.

Method: Generate specific token commitments and nullifiers, combine ZKPs to prove the validity of transactions, and ensure the anonymity of transaction participants.


Generation of token commitments and nullifiers:


Token commitment: Use hash functions to generate token commitments for token amounts, public identifiers (such as public keys), and random numbers to encode token transfer information.

Nullifiers: Nullifiers are generated by combining random numbers and private keys through hash functions to invalidate token commitments and ensure the uniqueness of token use.


Smart contracts and transaction verification:


Smart contracts on DLN execute transaction conditions, verify ZKPs, and ensure the legitimacy and privacy of transactions.


Transaction process: includes steps such as generating token commitments and nullifiers, submitting ZKPs to relayers, and relayers submitting transactions to smart contracts for verification.


Role of relayers:


The role of relayers: As a third party in the transaction, they receive anonymously submitted token commitments, nullifiers, and ZKPs, and submit them to smart contracts to complete the transaction.


Anonymity protection: Relays do not know the identities of both parties to the transaction, thereby protecting the anonymity of the transaction.


Transaction fee processing:


Anonymous payment of transaction fees (gas fees): By paying transaction fees to relayers, and then relayers paying to miners, it is avoided to pay fees directly from the transaction initiator's account, thereby reducing the possibility of tracking.

Fee verification: When smart contracts verify ZKPs, they confirm the legitimacy of transaction fees, but they do not need to know the source of the fees.


Short answer questions:


What are zero-knowledge proofs (ZKPs) and what role do they play in distributed ledger networks (DLNs)?


Answer: Zero-knowledge proofs (ZKPs) are a cryptographic technique that allows one party (the prover) to prove the truth of a fact to another party (the verifier) ​​without revealing any additional information other than the truth of the fact. In distributed ledger networks (DLNs), the role of ZKPs is mainly to protect transaction privacy and prevent transaction details from being obtained by unauthorized third parties, thereby maintaining the privacy rights of participants while ensuring transaction transparency.

What is the "gas tracking" mentioned and why do we need to prevent it?


Answer: "Gas tracking" refers to tracking the identities of transaction participants by analyzing the transaction fees (gas fees) on DLN. Due to the transparency of DLN, the transaction fee payment path may be used to infer the identity of the transaction initiator, thereby leaking privacy. Therefore, the proposed method aims to prevent such tracking and protect the anonymity of transaction participants through technical means such as ZKPs.

Please briefly describe the generation method and role of the proposed token commitment and nullifiers.


Answer: The proposed token commitment is generated by encoding the token amount, public identifier (such as public key) and random number through a hash function, and is used to represent the transfer information of the token. Nullifiers are generated by combining a hash function with a random number and a private key to invalidate the token commitment and ensure that each token can only be used once. The combination of token commitment and nullifiers can verify the validity of the transaction without revealing the specific transaction details, thereby protecting the privacy of the transaction.

What role does the relayer play in the proposed transaction process?


Answer: In the proposed transaction process, the relayer plays the role of a third-party transaction processor. It receives the token commitment, nullifiers and ZKPs anonymously submitted by the transaction initiator, and submits this information to the smart contract on the DLN to complete the transaction verification and fund transfer. The existence of relayers allows the identity of the transaction initiator to be hidden, because the relayers themselves do not know the true identities of the two parties to the transaction, thereby further protecting the anonymity of the transaction.

How do smart contracts participate in the transaction verification process?


Answer: As an automatically executed code on DLN, smart contracts are responsible for verifying the legitimacy and privacy of transactions. When the relayer submits transaction information containing token commitments, nullifiers, and ZKPs to the smart contract, the smart contract will execute the predefined verification logic to check the correctness of ZKPs, the matching relationship between token commitments and nullifiers, etc., to confirm the validity of the transaction. Only after all verifications are passed, the smart contract will execute the transaction and complete the transfer of funds.