Skip to content

undefinedlab/siphon_eth

Repository files navigation

🔒 Siphon Protocol

Next.js TypeScript Three.js Rust Solidity Citcom Python License

Enabling untraceable, hyperliquid and institutional-grade DeFi privacy with Fully Homomorphic Encryption and Zero-Knowledge proofs.

🚀 Live Demo


🎯 The Problem We Solve

⚠️ Three Critical Privacy Crises in DeFi:

🔍 Wallets Are Tracked

  • Chain analytics links addresses timing, and flows into identities.
  • Your PNL, history and every move are visible.

🤖 Value is Extracted

  • Visible flow widens quotes and worsens fills.
  • Sniping and MEV extraction destroys profitability.

💰 Liquidity is Siloed

  • Privacy coins and pools lack DeFi integration
  • Users forced to choose: privacy OR best execution

📊 Market Reality

  • $280M lost monthly to front-running attacks on DEXs
  • $12B in privacy coin market cap lacks DeFi integration
  • Zero truly private DEXs with easy access to global liquidity

🚀 The Siphon Solution

Siphon serves as the seamless privacy-preserving gateway between public and private capital, facilitating secure, private and verifiable movement of assets across multiple blockchains. By enabling frictionless access to the deepest, most liquid DeFi opportunities in a true omnichain environment, Siphon empowers institutions and individuals alike to transact and deploy strategies at scale—without sacrificing confidentiality, competitive edge, or market efficiency.

✨ Key Features:

🔒 Complete Privacy

  • Portfolio, PnL, and strategies are no longer visible on-chain
  • Encrypted state management

No Front-running

  • Eliminates order sniffing and MEV extraction
  • Private transaction routing

💰 Better Pricing

  • Cheaper transaction prices through optimized execution
  • Reduced slippage through privacy-preserving routing

🌐 Omnichain

  • Hyperliquid execution across multiple chains
  • Privacy preserved end-to-end

Siphon Architecture Diagram


🛠️ Technical Architecture

🔧 Core Technologies

🔐 FHE

Fully Homomorphic Encryption
Enables computation on encrypted data

🎭 ZK Proofs

Zero-Knowledge Proofs
Proves correctness—no data revealed

🌉 Avail Nexus SDK

Cross-Chain Operations
Seamless multi-chain execution

📈 Pyth Network

Price Feeds & Randomness
Reliable oracles and entropy

🛠️ Hardhat

Deployment Tool
Flexible, developer-friendly smart contract deployment

⚙️ EVM

Execution & Settlement Layer
Secure, composable, and EVM-compatible foundation for DeFi

The Five-Layer Architecture:

┌─────────────────────────────────────────────────────────────┐
│ Layer 5: Liquidity Interface                                │
│ - Public DEX aggregators                                    │
│ - Cross-chain bridges                                       │
│ - Modular design for privacy-native assets                  │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ Layer 4: Verification & Settlement                          │
│ - ZK proof of correct execution                             │
│ - On-chain verification                                     │
│ - Cryptographic guarantees                                  │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ Layer 3: Confidential Execution Environment (FHE Engine)    │
│ - Encrypted mempool                                         │
│ - Computation on encrypted data                             │
│ - Order matching & slippage calculation                     │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ Layer 2: Shielded Pool                                      │
│ - Incremental Merkle trees                                  │
│ - Zero-knowledge membership proofs                          │
│ - Nullifier system for double-spend prevention              │
└─────────────────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────┐
│ Layer 1: Vault Contract                                     │
│ - Trustless escrow for public assets                        │
│ - ETH, USDC, WBTC and more                                  │
│ - Release on valid ZK proof verification                    │
└─────────────────────────────────────────────────────────────┘

⚖️ Compliance & Regulatory Considerations

Siphon Protocol should integrate multiple compliance mechanisms to address regulatory requirements while maintaining core privacy principles:

🛡️ Risk Screening Gate

  • On-Chain Risk Oracle Integration: Funds entering the Siphon Vault must pass validation through established risk oracles (e.g., Chainalysis, TRM, or in-protocol scoring systems)
  • Source Verification: Addresses are screened against known restricted or sanctioned lists before admission

🔐 Zero-Knowledge Proof of Compliance

  • Privacy-Preserving Verification: Users can prove they meet KYC/AML requirements without revealing identity
  • Compliant Service Provider Integration: Works with compliance providers to generate non-revealing proofs
  • Address Sanctioning: Demonstrates funds are not from restricted address lists, cryptographically

📊 Verifiable Transparency Layer

  • Per-Batch Proofs: Each execution batch emits a zero-knowledge event proving:
    • Encrypted trades were executed correctly
    • State updates followed protocol rules
    • Fees were computed and distributed correctly
    • All without revealing underlying sensitive data
  • Cryptographic Guarantees: Mathematical proofs ensure system integrity
  • Audit Trail: Maintains verifiable record of protocol correctness while preserving user privacy

Note: These compliance mechanisms are part of the architectural design and serve to demonstrate how privacy and regulatory compliance can coexist. Real-world implementation would require integration with licensed compliance service providers and legal frameworks.

📁 Project Structure

siphon/
│
├── 📂 docs/                  # Documentation
├── 📂 packages/                 # Reusable cryptographic and utility packages
│   ├──  fhe-lib/                 # FHE matchine engine and python orchestrator
│   ├──  circuits/                # ZK-SNARK circuits for private proofs
│   └──  contracts/               # Solidity smart contracts for on-chain logic
│
├── 📂 public/                # Static assets

├── 📂 src/                   # Application source code
│   ├── 📂 app/              # Next.js 14 App Router pages and API routes
│   ├── 📂 components/       # Reusable React components
│   │   ├── ui/
│   │   ├── trading/
│   │   └── wallet/
│   │
│   ├── 📂 lib/              # Core FHE and ZK proof implementations
│   │   ├── fhe/
│   │   ├── zk/
│   │   └── blockchain/
│   │
│   ├── 📂 hooks/            # React hooks
│   ├── 📂 utils/            # Utility functions
│   └── 📂 types/            # TypeScript types
│
├── 📄 README.md


🚀 Quick Start

📋 Prerequisites

  • Node.js 18+
  • npm or yarn
  • Git

⚡ Installation

# Clone the repository
git clone https://github.com/undefinedlab/siphon_eth.git
cd siphon_eth/siphon

# Install dependencies
npm install

# Run development server
npm run dev

🌐 Open http://localhost:3000 to see the application.

📜 Available Scripts

Command Description
npm run dev 🚀 Start development server
npm run build 🏗️ Build for production
npm run start ▶️ Start production server
npm run lint 🔍 Run ESLint
npm run test 🧪 Run tests

🤝 Contributing

We welcome contributions! Here's how you can help:

🚀 Getting Started

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📋 Development Guidelines

  • Follow the existing code style
  • Add tests for new features
  • Update documentation as needed
  • Ensure all tests pass

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


⚠️ Critical Disclaimer

Proof of Concept & Academic Exploration

This project is a proof of concept and represents an exploration of potential directions for privacy-preserving DeFi protocols. It is NOT intended for production use, real-world financial transactions, or any non-academic purposes.

No Warranty or Responsibility

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY.

Usage Restrictions

  • Academic & Research Only: This code is intended solely for academic study, research, and educational purposes
  • NOT FOR PRODUCTION: Do not deploy this code in any production environment
  • NOT FOR FINANCIAL USE: Do not use for any actual financial transactions or trading
  • EXPERIMENTAL: This is experimental software with no security guarantees
  • Zero Responsibility: Authors accept zero responsibility for any use, misuse, or consequences

🌟 Siphon Protocol

**Made with ❤️ for Eth Global **