Skip to content

edycutjong/civa

Repository files navigation

πŸ” Civa β€” CipherVault on Solana

Hide your trades. Settle atomically. Zero MEV. Institutional-grade OTC dark pool protocol using Encrypt SDK for encrypted state and Ika Custody for bridgeless atomic settlement. Audited by Adevar Labs.

Civa Hero Image

Live Demo Pitch Deck Pitch Video Built for Frontier


Next.js 16 Solana TypeScript License: MIT Civa CI


🎯 Problem

Large-scale crypto trades on public DEXs are fundamentally broken for institutional participants:

  • MEV Extraction β€” Bots front-run and sandwich large orders, extracting $1.4B+ in 2025
  • Market Impact β€” A $2M sell on a public AMM moves price 2-5%, costing tens of thousands in slippage
  • Identity Exposure β€” On-chain analysis links wallets to real identities; competitors see your positions
  • No On-Chain OTC β€” Traditional desks are custodial, slow (T+1), and KYC-gated

The crypto OTC market exceeds $100B annually, yet there is no privacy-preserving, non-custodial OTC protocol on Solana.

πŸ’‘ Solution

Civa (CipherVault) provides an encrypted OTC dark pool in the DeFi category:

  1. πŸ”’ Makers post encrypted offers β€” lock assets in vault PDAs, trade params encrypted via Encrypt SDK
  2. πŸ‘οΈ Takers match blindly β€” browse liquidity bands ($1M-$5M) without seeing exact amounts
  3. ⚑ Atomic settlement β€” Ika Custody executes simultaneous swap, zero custodial risk
  4. πŸ›‘οΈ Post-trade privacy β€” settlement reveals only net transfer, not order sizes or parties

Entire flow: order β†’ settlement in under 10 seconds. 100% on-chain.


πŸ—οΈ Architecture & Tech Stack

Layer Technology
Frontend Next.js 16 (App Router), React 19
Styling Tailwind CSS v4
Encryption Encrypt SDK (confidential tokens, ZKP)
Settlement Ika Custody (bridgeless atomic swap)
Blockchain Solana Devnet
Audit Adevar Labs Security Credits
Deploy Vercel

πŸ“ Full architecture deep-dive β†’ β€” System diagram, matching flow, and encryption details.


πŸš€ Quick Start

# Clone
git clone https://github.com/edycutjong/civa.git
cd civa

# Install
npm install

# Configure environment
cp .env.example .env.local
# Fill in: ADEVAR_API_KEY (optional β€” demo mode works without keys)

# Run
npm run dev

Open http://localhost:3000 β€” the hero page loads with full animation suite.

Environment Variables

Variable Required? Where to Get
NEXT_PUBLIC_ADEVAR_API_URL Optional Encrypt SDK β€” defaults to demo endpoint
ADEVAR_API_KEY Optional Not required (No developer portal for Ika yet)

πŸ’‘ Note for Judges (Where to get the API key?): The variable is named ADEVAR_API_KEY after the track sponsor, but it is actually intended for the Encrypt SDK / Ika backend. Because a public developer portal does not exist yet, you do not need an API key. All API keys are 100% optional. If left blank, the app will automatically fall back to generating mock ZK proofs so you can test the entire flow uninterrupted.


πŸ“± User Flow

1. Landing Page

Premium glassmorphism hero with particle canvas, orbital rings, animated counters, and mesh gradient background. Floating sponsor badges (Encrypt, Ika, Adevar) and staggered entrance animations.

2. Trading Terminal

Create encrypted OTC offers with asset selection, amount input (encrypted on-chain), and visible liquidity band (ZKP). Real-time ZK proof generation simulation.

3. Dark Pool Liquidity

Browse available encrypted orders showing only visible bands. Order IDs, asset types, and status β€” all trade details hidden via zero-knowledge proofs.

4. Privacy Gap Comparison

Split-screen view: Public Explorer (encrypted gibberish) vs Civa Dark Desk (decrypted view). Demonstrates the privacy advantage for authorized participants.


πŸ“‚ Project Structure

src/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ page.tsx                         # Hero + Dashboard
β”‚   β”œβ”€β”€ about/page.tsx                   # Project documentation
β”‚   β”œβ”€β”€ layout.tsx                       # Root layout + fonts
β”‚   β”œβ”€β”€ globals.css                      # Design system + animations
β”‚   └── api/health/                      # Health check endpoint
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ HeroSection.tsx                  # Animated hero with particles
β”‚   β”œβ”€β”€ StatusBar.tsx                    # Network status bar
β”‚   β”œβ”€β”€ Footer.tsx                       # Portfolio footer
β”‚   β”œβ”€β”€ OrderCreator.tsx                 # Encrypted order form
β”‚   β”œβ”€β”€ LiquidityBoard.tsx              # Dark pool order table
β”‚   └── ComparisonSplitScreen.tsx        # Public vs Private view
β”œβ”€β”€ lib/
β”‚   └── adevar.ts                        # Encrypt/Ika SDK client
docs/
β”œβ”€β”€ ARCHITECTURE.md                      # System architecture
└── readme-hero.png                      # Hero banner image

🎨 Design System

Token Value Usage
Background #020617 App background (Slate 950)
Surface #0a0f1e Cards, panels
Primary #06b6d4 Encrypt/Ika accent (Cyan)
Accent #8b5cf6 Ika/secondary (Purple)
Success #22c55e Private/verified states
Danger #ef4444 Public/exposed states
Font Brand Orbitron Headlines, protocol name
Font Body Inter Body text
Font Mono JetBrains Mono Data, addresses, terminal

πŸ† Sponsor Tracks

Track Sponsor Prize
Encrypted Capital Markets Encrypt & Ika $15,000
Security Audit Credits Adevar Labs $50,000
General Track 100xDevs $10,000

πŸ›‘οΈ Security Architecture

Threat Mitigation
Front-running All order params encrypted via Encrypt SDK
Vault drainage Multi-sig admin, timelock on upgrades
Double-spend Atomic escrow β€” both sides lock first
Timeout exploitation Auto-refund after configurable timeout
Oracle manipulation No oracle β€” peer-to-peer pricing

Security Statement

Civa handles institutional liquidity and executes complex atomic settlements using novel cryptographic primitives (Encrypt SDK) and custody logic (Ika SDK). Because our core value proposition is secure, zero-MEV trading, our architecture must be impenetrable. A professional security audit from Adevar Labs is critical to validating our escrow mechanisms, zero-knowledge integrations, and Anchor program safety before we can safely onboard institutional capital to the Solana mainnet.


πŸ’° Funding & Pitch Deck

  • Pitch Deck: View our complete investor pitch deck
  • Funding Stage: Civa is currently bootstrapped. We are actively utilizing the Colosseum Frontier Hackathon to validate our product-market fit.
  • Future Plans: Post-hackathon, we plan to raise a pre-seed round to fund a mainnet launch, finalize our security audits, and execute our initial go-to-market strategy targeting high-volume OTC traders.

πŸ“„ License

MIT


Built for the Colosseum Frontier Hackathon
by @edycutjong

About

πŸ” Institutional-grade OTC dark pool using Encrypt SDK for encrypted state and Ika Custody for bridgeless atomic settlement.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors