Skip to content

ZackAttax/spqr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scalable Private Quantum Resistant Payments App

When was the last time you thought about the Roman Empire?

SPQR

SPQR is a proof-of-concept of privacy payments on Starknet, utilizing STARKs and native account abstraction for integrity and confidentiality.

Overview

SPQR is implemented as a single Starknet contract that interacts with the following contacts:

  • ERC20 token (or multiple tokens) that is to be shielded (in this repo we use STRK)
  • Integrity fact registry, for abstracting STARK proof verification

It is envisioned to use fee subsidization to break the link between Starknet accounts and crypto notes, however the current PoC does not implement this logic.

UTXO model is used for shielded accounts. Shielded transactions are created and stored on the client and not broadcasted to keep the information about the sender, receiver, and amount private. A proof of validity is generated (also on the client) and submitted onchain to prevent double spending. The smart contract only stores the hashes of crypto notes (UTXOs) and relies on proofs to enforce integrity.

Notes on privacy

  1. cairo1-run runner copies all inputs to the output segment which leads to the privacy leak. This is a known issue, which is resolved with the new version of cairo-executor that is able to produce execution trace (for proving).
  2. Proofs that are generated with Stone leak some bits of the trace because polynomial randomization is not implemented. Read more in starkware-libs/stone-prover#8 (comment) also https://eprint.iacr.org/2024/1037
  3. Nullifiers are not used (for simplicity) and hence some information about spent notes is leaked.
  4. Transaction fees are not subsidized (but it is envisioned) so submitting a proof/private transfer might leak a connection between a Starknet account and a particular note.
  5. Transactions are not encrypted (but they are note stored onchain either).

About

Scalable Provable Quantum Resistant network

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •