Skip to content

💱 Add Privacy-Preserving Swaps via Z-Chain #14

@zeekay

Description

@zeekay

Implement private token swaps using the new Z-Chain zero-knowledge features.

Background

The new Z-Chain supports shielded transactions with hidden amounts. We should add support for private swaps in the DEX.

Timeline (4 weeks)

Week 1 (Feb 3-7, 2025)

  • Research & Design (3 days)
    • Study Z-Chain transaction format
    • Design privacy swap UI/UX
    • Plan smart contract architecture

Week 2 (Feb 10-14, 2025)

  • Smart Contract Development (5 days)
    • Create PrivacyPool contract
    • Implement zero-knowledge proof verification
    • Add cross-chain message handling
    • Write comprehensive tests

Week 3 (Feb 17-21, 2025)

  • Frontend Integration (4 days)
    • Add privacy toggle to swap UI
    • Implement proof generation in browser
    • Create shielded balance display
    • Add transaction status tracking

Week 4 (Feb 24-28, 2025)

  • Testing & Audit Prep (4 days)
    • Integration testing
    • Gas optimization
    • Security review
    • Documentation

Technical Details

  • Use Groth16 proofs for efficiency
  • Support partial privacy (amount hidden, addresses visible)
  • Maintain same swap interface with privacy option
  • Cross-chain liquidity via B-Chain bridge

Success Metrics

  • < 5 second proof generation
  • Gas cost < 2x regular swap
  • No UX degradation
  • Pass security audit

Assignee: @zeekay
Priority: P1 - HIGH
Due Date: February 28, 2025

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions