DEV Community

Cover image for SelectConnect: Privacy-first contact sharing with zero-knowledge proofs & staked bonds for harassment/spam protection.
J. Santi
J. Santi

Posted on

SelectConnect: Privacy-first contact sharing with zero-knowledge proofs & staked bonds for harassment/spam protection.

Midnight Network Challenge: Protect That Data

This is a submission for the Midnight Network "Privacy First" Challenge - Protect That Data prompt

What I Built

SelectConnect is the world's first privacy-preserving contact sharing platform that uses zero-knowledge cryptography and economic bonds to enable safe, revokable, or progressive information sharing while preventing harassment and spam.

SelectConnect solves a $100B privacy crisis where 500M+ professionals share business cards annually, 60% of women face harassment after networking events, and $2.1B is lost to spam from leaked contact data. Our solution combines progressive contact revelation with economic abuse deterrence to create truly safe networking without compromising privacy.

Demo

GitHub Repository: https://github.com/bytewizard42i/SelectConnect

Quick Demo Setup:

git clone https://github.com/bytewizard42i/SelectConnect.git
cd SelectConnect/selectConnect_app_pro
./start-hackathon-demo.sh
# Access at http://localhost:3000
Enter fullscreen mode Exit fullscreen mode

How I Used Midnight's Technology

SelectConnect leverages Midnight's Compact v0.16 language to implement 22 ZK circuits across 967 lines of smart contract code:

Core ZK Implementations

  1. Private Authorization Circuits

    • Prove card ownership without revealing admin identity
    • Zero-knowledge credential verification
    • Commitment-based access control
  2. Progressive Disclosure Circuits

    • Merkle tree proofs for level verification
    • Encrypted reveal with time-limited access
    • Selective information disclosure without full exposure
  3. Economic Security Circuits

    • Bond commitment and verification
    • Reputation-based pricing calculations
    • Slash mechanism with private evidence
  4. Privacy Routing Circuits

    • 5-digit anonymous access codes
    • Trackable vs non-trackable interaction modes
    • Cross-context privacy preservation

Midnight Infrastructure Integration

  • Local Proof Server: Docker-based Midnight environment for circuit compilation
  • Compact Smart Contracts: 813 lines implementing unified protocol
  • ZK Proof Generation: Real-time proof creation for all user interactions
  • Privacy-First Storage: All sensitive data stored as cryptographic commitments

Data Protection as a Core Feature

Privacy isn't an afterthought in SelectConnect—it's the foundational architecture. Every design decision prioritizes user privacy:

Zero-Knowledge by Design

  • Contact Information: Never stored in plaintext, only as cryptographic commitments
  • User Identity: Pseudonymous interactions with provable accountability
  • Evidence Storage: Harassment reports kept off-chain with ZK proofs of validity
  • Access Patterns: No correlation between real identity and card interactions

Progressive Privacy Model

  1. Level 0: Public card exists (no personal data)
  2. Level 1: Name reveal (encrypted, time-limited)
  3. Level 2: Professional profile (LinkedIn, encrypted)
  4. Level 3: Email contact (encrypted, revocable)
  5. Level 4: Phone number (highest trust, fully encrypted)

Economic Privacy Protection

  • Abuse Bonds: Economic deterrent without identity exposure
  • Reputation System: Track bad actors across contexts without linking to real identity
  • Dynamic Pricing: Higher costs for repeat offenders while preserving anonymity
  • Victim Compensation: Automatic payouts from slashed bonds

Real-World Privacy Guarantees

  • Conference Networking: Professional connections without harassment risk
  • Dating Safety: Progressive trust building with economic accountability
  • Enterprise Sales: Qualified leads without spam or data leaks
  • Cross-Platform: Privacy preserved across different interaction contexts

Set Up Instructions / Tutorial

Prerequisites

  • Docker and Docker Compose
  • Node.js 18+ and npm
  • Git

Quick Start (5 minutes)

# 1. Clone the repository
git clone https://github.com/bytewizard42i/SelectConnect.git
cd SelectConnect/selectConnect_app_pro

# 2. Run automated setup
chmod +x start-hackathon-demo.sh
./start-hackathon-demo.sh

# 3. Access the application
# Frontend: http://localhost:3000
# Proof Server: http://localhost:8080
Enter fullscreen mode Exit fullscreen mode

Manual Setup (Development)

# 1. Start Midnight proof server
./start-proof-server.sh

# 2. Install dependencies
npm install

# 3. Configure environment
cp .env.example .env
# Edit .env with your settings

# 4. Compile contracts
npm run compile

# 5. Run tests
npm test

# 6. Start development server
npm run dev
Enter fullscreen mode Exit fullscreen mode

Production Deployment

# 1. Full-stack deployment
./start-full-stack.sh

# 2. Configure production environment
cp .env.example .env.production
# Set production values

# 3. Build and deploy
npm run build
npm run start
Enter fullscreen mode Exit fullscreen mode

Testing Scenarios

Conference Networking Test:

npm run test: conference
Enter fullscreen mode Exit fullscreen mode

Dating Safety Test:

npm run test: dating
Enter fullscreen mode Exit fullscreen mode

Enterprise Sales Test:

npm run test: enterprise
Enter fullscreen mode Exit fullscreen mode

Architecture Overview

SelectConnect/
├── contracts/
│   ├── SelectConnectProtocol.compact  # 967 lines, 22 ZK circuits
│   └── AbuseEscrow.compact           # Bond management
├── frontend/
│   └── NoirCardApp.tsx               # React UI with QR codes
├── relay/
│   └── RelayService.ts               # Privacy-preserving message relay
├── docker-compose.yml                # Midnight infrastructure
├── TUTORIAL.md                       # Comprehensive guide (25,477 bytes)
└── tests/scenarios/                  # Real-world test cases
Enter fullscreen mode Exit fullscreen mode

Key Components

  1. Smart Contracts: Unified protocol with complete privacy preservation
  2. Frontend: Beautiful React interface with QR code generation
  3. Relay Service: Privacy-preserving message routing with bond verification
  4. Proof Server: Local Midnight environment for ZK proof generation
  5. Test Suite: Comprehensive scenarios covering all use cases

For detailed instructions, see our award-winning TUTORIAL.md with step-by-step guidance, architecture explanations, and production deployment strategies.


SelectConnect transforms digital networking by making privacy and accountability work together, not against each other. Built with Midnight's groundbreaking ZK technology, it's the future of safe, private contact sharing.

Team name:

EnterpriseZk Labs LLC
Website:enterprisezk.com
Team members for this hackathon:
John Santi (johnny5i aka bytewizard42i)
X handle: https://x.com/RealJohnSanti

Thank you for checking it out!

Top comments (0)