#circuit #phoenix #transaction #notes #model #gadget #sender

phoenix-circuits

Circuit definitions for Phoenix, a privacy-preserving ZKP-based transaction model

6 releases

new 0.2.0 Jun 19, 2024
0.2.0-rc.3 Jun 18, 2024
0.2.0-rc.2 Jun 14, 2024
0.2.0-rc.1 Jun 13, 2024
0.1.0 May 22, 2024

#717 in Cryptography

Download history 124/week @ 2024-05-20 2/week @ 2024-06-03 248/week @ 2024-06-10

374 downloads per month

MPL-2.0 license

69KB
1.5K SLoC

Phoenix Circuits

Phoenix is the transaction model used by Dusk, an open-source public blockchain with a UTXO-based architecture that allows for the execution of obfuscated transactions and confidential smart contracts.

This library contains the implementation of the Phoenix-circuits, to prove, in zero-knowledge, that the following conditions hold true:

  1. Membership: every note that is about to be spent is included in the Merkle tree of notes.
  2. Ownership: the sender holds the note secret key for every note that is about to be spent.
  3. Nullification: the nullifier is calculated correctly.
  4. Minting: the value commitment for the newly minted notes are computed correctly.
  5. Balance integrity: the sum of the values of all spent notes is equal to the sum of the values of all minted notes + the gas fee + a deposit, where a deposit refers to funds being transfered to a contract.

lib.rs:

Phoenix's circuits and gadgets.

Dependencies

~8.5MB
~183K SLoC