Zcash Evaluation
Zcash Proving System Evaluation
Section titled “Zcash Proving System Evaluation”Evaluation of Zcash’s proving system and potential integration with SIP Protocol.
Overview
Section titled “Overview”Zcash pioneered shielded transactions using zero-knowledge proofs. SIP evaluates integration points while maintaining its application-layer approach.
Zcash Privacy Features
Section titled “Zcash Privacy Features”Shielded Pools
Section titled “Shielded Pools”| Pool | Protocol | Status |
|---|---|---|
| Sprout | BCTV14 | Deprecated |
| Sapling | Groth16 | Active |
| Orchard | Halo 2 | Latest |
Key Properties
Section titled “Key Properties”| Property | Zcash | SIP |
|---|---|---|
| Amount privacy | Yes | Yes (Pedersen) |
| Sender privacy | Yes | Yes (Stealth) |
| Recipient privacy | Yes | Yes (Stealth) |
| On-chain shielding | Yes | No (app layer) |
| Trusted setup | Yes (Sapling) / No (Orchard) | No (Noir) |
Integration Options
Section titled “Integration Options”Option 1: Zcash as Destination
Section titled “Option 1: Zcash as Destination”Use Zcash shielded pool as swap destination:
Ethereum → SIP → NEAR Intents → Zcash (shielded)Pros:
- Leverage Zcash’s proven privacy
- Full on-chain shielding
Cons:
- Requires Zcash RPC access
- Limited to ZEC as output
Option 2: ZcashRPCClient
Section titled “Option 2: ZcashRPCClient”SIP includes Zcash RPC client for shielded operations:
import { ZcashRPCClient } from '@sip-protocol/sdk'
const client = new ZcashRPCClient({ rpcUrl: 'http://localhost:8232', rpcUser: 'user', rpcPassword: 'password'})
// Create HD accountconst { account } = await client.createAccount()
// Get unified addressconst { address } = await client.getAddressForAccount( account, ['sapling', 'orchard'])
// Send shielded transactionconst txid = await client.sendShielded({ from: zAddress, to: recipientZAddress, amount: 1.5, memo: 'Private transfer'})Option 3: Proof Verification
Section titled “Option 3: Proof Verification”Verify Zcash proofs within SIP:
// Not implemented - future considerationconst isValid = await verifyZcashProof(proof, publicInputs)Halo 2 Analysis
Section titled “Halo 2 Analysis”Orchard uses Halo 2 for trustless proofs:
Advantages
Section titled “Advantages”| Feature | Benefit |
|---|---|
| No trusted setup | Eliminates ceremony risk |
| Recursive proofs | Proof aggregation |
| IPA commitments | Smaller proof size |
Considerations
Section titled “Considerations”| Aspect | Note |
|---|---|
| Complexity | Steep learning curve |
| Performance | Slower than Groth16 |
| Ecosystem | Less tooling than SNARKs |
Decision: Application Layer
Section titled “Decision: Application Layer”SIP chose application-layer privacy over protocol integration:
Rationale
Section titled “Rationale”- No blockchain changes - Works with existing chains
- Flexibility - Not tied to single privacy technology
- Speed - Faster iteration than protocol changes
- Multi-chain - Privacy across all supported chains
Tradeoffs
Section titled “Tradeoffs”| Approach | Protocol Level | Application Level |
|---|---|---|
| Privacy strength | Stronger | Good |
| Implementation | Harder | Easier |
| Blockchain changes | Required | None |
| Flexibility | Lower | Higher |
Zcash RPC Methods
Section titled “Zcash RPC Methods”Account Management
Section titled “Account Management”// Create account (modern HD approach)const { account } = await client.createAccount()
// Get address for accountconst { address } = await client.getAddressForAccount( account, ['sapling'], // Receiver types 0 // Diversifier index)Deprecated Methods
Section titled “Deprecated Methods”| Deprecated | Replacement |
|---|---|
generateShieldedAddress() | createAccount() + getAddressForAccount() |
z_getnewaddress | Account-based approach |
Shielded Transactions
Section titled “Shielded Transactions”// Get balanceconst balance = await client.getShieldedBalance(address)
// List transactionsconst txs = await client.listShieldedTransactions(address)
// Send shieldedconst txid = await client.sendShielded({ from: sender, to: recipient, amount: 10, memo: 'Optional memo'})Unified Addresses
Section titled “Unified Addresses”Zcash Unified Addresses (ZIP-316) combine multiple receiver types:
u1...├── Orchard receiver (if available)├── Sapling receiver└── Transparent receiver (optional)// Generate unified addressconst { address } = await client.getAddressForAccount( account, ['orchard', 'sapling', 'p2pkh'] // Include all receiver types)Performance Comparison
Section titled “Performance Comparison”| Metric | Zcash Sapling | Zcash Orchard | SIP (Noir) |
|---|---|---|---|
| Proof gen | ~40s | ~2s | ~3s |
| Proof size | ~1KB | ~5KB | ~200B |
| Verify | ~10ms | ~10ms | ~10ms |
| Trusted setup | Yes | No | No |
Future Integration
Section titled “Future Integration”Potential Enhancements
Section titled “Potential Enhancements”- Zcash as privacy pool - Route through shielded pool
- Proof interop - Verify Zcash proofs in SIP
- Viewing key compat - Share viewing keys across systems
Not Planned
Section titled “Not Planned”- Direct Zcash protocol modification
- Sprout pool support (deprecated)
- Mining/consensus integration