
Aegis
A privacy-focused shielded pool implementation using Zero-Knowledge Proofs (ZKPs). It enables private transactions with verifiable commitments and nullifiers in a blockchain ecosystem.
About
This project is a cryptographic shielded pool framework leveraging @protokit Zero-Knowledge Proofs (ZKPs) to facilitate secure and private transactions. It implements a JoinSplit transaction model, where users can privately deposit, transfer, and withdraw funds while maintaining verifiable integrity and privacy. The system uses a Merkle tree structure to track commitments and nullifiers, ensuring spent assets cannot be reused. It supports input-output balance verification, cryptographic nullifier tracking, and efficient note management. Integration with a runtime module provides seamless blockchain operation, including setting roots and processing transactions with enforced privacy guarantees.
How it's made
The project is built using the Protokit Framework from Mina. 1. Technologies: - o1js: For cryptographic primitives like Poseidon hash, Merkle trees, and key handling (private and public keys). - Merkle Tree: Manages transaction commitments and nullifiers with tree-based proofs of inclusion. - Proto-kit Module SDK: Provides runtime hooks and blockchain state handling for integrating the shielded pool. 2. Components: - JoinSplitTransaction: - Encodes the ZKPs logic for verifying inputs, outputs, and nullifiers. - Proves input-output balance while maintaining confidentiality of amounts and participants. - ShieldedPool Runtime: - Processes transactions by verifying proofs, validating roots, and recording nullifiers to prevent double-spending. - Emits events for nullifiers to track changes in state. - NoteStore: - Manages notes (spendable assets) and integrates with Merkle tree for inclusion proofs. - Handles note creation, addition, and nullifier management. 3. Hacky Details: - A custom `IndexedMerkleTree` was created for precise leaf handling and proof generation, streamlining root updates and witness creation. - The `Note` abstraction simplifies cryptographic encoding of user-specific transactions, making it easy to work with commitments and nullifiers programmatically. 4. Integration: - Combined with a blockchain testing environment (`TestingAppChain`) to simulate transaction workflows, enabling end-to-end validation. - Utilized `Proto-kit` for seamless runtime deployment and proof-of-concept testing.