SNIP-10: Introducing Privacy-Preserving Transactions on StarkNet

Author: Pintea Tudor
Status: Draft
Type: Standards Track
Category: Core
Created: November 1, 2023


Abstract

This SNIP proposes the introduction of privacy-preserving transactions on StarkNet using zk-SNARKs. The goal is to enable users to transact on StarkNet without revealing the transaction amount or the parties involved, enhancing user privacy.

Motivation

While StarkNet offers scalability and efficiency, user transactions are currently transparent, similar to many other blockchains. As privacy becomes a growing concern among users, introducing privacy-preserving transactions will make StarkNet more appealing to a broader audience and enhance its utility.

Specification

  1. zk-SNARKs Integration: Integrate zk-SNARKs proofs to validate transactions without revealing transaction data.
  2. New Transaction Type: Introduce a new transaction type, PrivateTransaction, which will utilize zk-SNARKs to keep transaction details hidden.
  3. Gas Fees: Gas fees for PrivateTransaction will be slightly higher due to the computational complexity of zk-SNARKs.
  4. Opt-in Privacy: Users can choose between regular transactions and privacy-preserving transactions.

Rationale

zk-SNARKs have been successfully implemented in other blockchain platforms for privacy. They allow for transaction validation without revealing the transaction’s details, making them a suitable choice for this feature.

Backwards Compatibility

This proposal introduces a new transaction type but does not alter the existing transaction structure. Therefore, it is backward compatible with current StarkNet implementations.

Test Cases

  1. Private Transaction Validation: Ensure that PrivateTransaction is validated and processed without revealing transaction details.
  2. Gas Consumption: Confirm that gas fees for PrivateTransaction are consistent with the proposal.

Reference Implementation

A reference implementation will be provided on the StarkNet GitHub repository under the branch feature/private-transactions.

Security Considerations

While zk-SNARKs are considered secure, thorough auditing and testing will be necessary to ensure that the privacy feature does not introduce vulnerabilities into StarkNet.

Copyright Waiver

This SNIP is released into the public domain.


This SNIP proposes a new feature to enhance user privacy on StarkNet by introducing privacy-preserving transactions using zk-SNARKs.

Hi there,

is there any progress or interest around this SNIP?

Curious to learn a possible roadmap to having privacy-preserving txs on Starknet.

There is a Stark Verifier today on mainnet since Herodotus published it.
Additionally soon will be a Pairing available