███████╗██╗ ██╗██╗ ██████╗ ██╗ ██╗██╗ ██╗
██╔════╝╚██╗ ██╔╝██║ ██╔══██╗██║ ██║╚██╗ ██╔╝
███████╗ ╚████╔╝ ██║ ██████╔╝███████║ ╚████╔╝
╚════██║ ╚██╔╝ ██║ ██╔═══╝ ██╔══██║ ╚██╔╝
███████║ ██║ ███████╗██║ ██║ ██║ ██║
╚══════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚═╝
Confidential OTC Settlement Rail on Arbitrum
Trade without revealing your identity, size, or price — enforced by cryptography, not trust.
Sylphy is an institutional-grade, privacy-first OTC protocol where two parties can trade large blocks of digital assets without leaking sensitive information to the market. Every trade is:
- 🔒 Private — amounts hidden via Pedersen commitments
- 🤫 Anonymous — identity sealed inside a Trusted Execution Environment
- ✅ Compliant — every party is KYC/AML verified via ERC-3643 before settlement
- ⚡ Fast & Cheap — atomic settlement on Arbitrum L2
╔══════════════════════════════════════════════════════════════╗
║ SYLPHY FLOW ║
╠══════════════════════════════════════════════════════════════╣
║ ║
║ Trader A (BUY intent) ──┐ ║
║ ├──► TEE Matching Engine ║
║ Trader B (SELL intent) ──┘ (Nox Protocol) ║
║ │ ║
║ ▼ ║
║ Compliance Check (ERC-3643) ║
║ │ ║
║ ▼ ║
║ Atomic On-Chain Settlement ║
║ (Arbitrum Sepolia) ║
║ │ ║
║ ▼ ║
║ Encrypted Audit Log → Regulator ║
║ ║
╚══════════════════════════════════════════════════════════════╝
sylphy/
│
├── 📁 frontend/ # React dashboard — the trading interface
│ ├── src/
│ │ ├── App.jsx # Core app — 5 dashboard pages
│ │ ├── main.jsx # Entry — RainbowKit + Wagmi providers
│ │ ├── wagmi.ts # Chain config — Arbitrum Sepolia
│ │ ├── contracts.ts # ABIs + deployed addresses + helpers
│ │ └── styles.css # Full design system (dark terminal theme)
│ ├── dashboard.html # Dashboard HTML entry
│ ├── index.html # Landing page HTML entry
│ └── vite.config.ts # Vite build config
│
├── 📁 backend/ # Node.js intent API + matching engine
│ ├── server.js # Express REST API (CORS, validation, routes)
│ ├── db.js # JSON file storage (zero native deps)
│ └── matcher.js # Price-time-priority matching engine
│
├── 📁 contracts/ # Solidity smart contracts
│ ├── SylphyCompliance.sol # KYC/AML on-chain verification (ERC-3643)
│ ├── SylphyAuditLog.sol # Encrypted regulator audit trail
│ ├── SylphySettlement.sol # Core atomic settlement engine
│ └── interfaces/ # Shared interfaces
│
├── 📁 scripts/ # Hardhat deployment & verification
│ ├── deploy.ts # Deploy all contracts + wire roles
│ ├── verify.ts # Verify on Arbiscan
│ └── simulate-tee.ts # Simulate TEE matching for testing
│
├── 📁 tee/ # TEE enclave simulation (Nox Protocol)
│
├── 📁 tests/ # Contract test suite (Hardhat)
│
├── hardhat.config.ts # Hardhat config — optimizer + network
├── .env.example # Environment variable template
└── README.md # You are here
React 18 · Vite · RainbowKit · Wagmi v2 · TanStack Query
The dashboard provides a terminal-aesthetic trading interface with 5 sections:
| Page | Description | Data Source |
|---|---|---|
| 🖥️ Dashboard | Real-time stats, order book, TEE status terminal, trade activity feed | Mock (demo) + wallet balance via wagmi |
| 📋 OTC Desk | Submit BUY/SELL intents — token, amount, price limit, slippage, expiry | Calls POST /api/intents on backend |
| 💱 Settlements | Live matched trades + open intents for connected wallet | GET /api/matches/:address + /api/intents/:address |
| ✅ Compliance | KYC/AML status, identity claim hash, ERC-3643 attestation details | On-chain via SylphyCompliance |
| 🔐 Audit Log | Encrypted audit entries — visible structure, content regulator-key-only | GET /api/matches/:address |
Supported Wallets: MetaMask · Rainbow · WalletConnect · Coinbase Wallet
Node.js · Express · JSON file persistence · Auto-matching every 10 seconds
Development: http://localhost:4000
Production: https://your-railway-url.up.railway.app
| Method | Endpoint | Auth | Description |
|---|---|---|---|
GET |
/api/health |
None | Service health check |
POST |
/api/intents |
None | Submit a new trade intent |
GET |
/api/intents/:address |
None | Get all intents for a wallet |
GET |
/api/intents/detail/:id |
None | Get a single intent by ID |
DELETE |
/api/intents/:id |
x-wallet-address header |
Cancel a pending intent |
GET |
/api/matches/:address |
None | Get all matches for a wallet |
GET |
/api/matches |
None | Get all matches (admin/debug) |
POST |
/api/match |
None | Manually trigger matching cycle |
POST /api/intents
{
"address": "0xYourWalletAddress",
"direction": "BUY", // or "SELL"
"token": "RLC", // RLC | ETH | USDC | WBTC
"amount": 500000, // minimum 1,000
"price_limit": 1.40, // max you'll pay (BUY) or min (SELL)
"slippage": 0.3, // 0.1 – 5.0 %
"expiry_min": 30 // 30 | 60 | 240 | 1440
}BUY fills if: buy.price_limit ≥ sell.price_limit × (1 - slippage%)
Exec price = (buy.price_limit + sell.price_limit) / 2
Exec amount = min(buy.amount, sell.amount)
Priority = price → time (FIFO for equal prices)
Solidity 0.8.24 · OpenZeppelin · Hardhat · viaIR optimizer · Arbitrum Sepolia
| Contract | Address | Arbiscan |
|---|---|---|
| SylphyCompliance | 0xAabF6602a0b800e2D86e1087b55b720d6423242f |
✅ Verified |
| SylphyAuditLog | 0x3e8651E19b50b3676cFFc68b965fF9A2d06e07ea |
✅ Verified |
| SylphySettlement | 0x0971b15f06398882B71bAedd27fb28B535751b1a |
✅ Verified |
SylphyCompliance.sol
- On-chain KYC/AML verification via ERC-3643 identity claims
- Stores only attestation hashes — never raw personal data
- Regulator and admin roles with granular access control
SylphyAuditLog.sol
- Receives encrypted audit payloads from the TEE operator
- Each entry is AES-256 encrypted with the regulator's public key
- Emits events for off-chain indexing — fully transparent structure
SylphySettlement.sol
- Accepts
SettlementParamswith TEE attestation + compliance proof - Verifies Pedersen commitments on-chain before fund movement
- Supports ERC-20 tokens via
SafeERC20 - Pausable, role-based, reentrancy-protected
| Feature | Technology | What It Hides |
|---|---|---|
| Trade amount | Pedersen commitment | Exact size never on-chain |
| Trade price | TEE sealed computation | Price inside secure enclave |
| Counterparty | Nox Protocol TEE | Neither party knows the other |
| Identity | ERC-3643 claim hash | Personal data never stored |
| Audit content | AES-256 regulator key | Details private from market |
| Timing | Jitter randomization | Strategy not inferrable |
- Node.js v18 or higher
- Git
- MetaMask (or any WalletConnect-compatible wallet)
- ETH on Arbitrum Sepolia — Quicknode Faucet
git clone https://github.com/vibevortex32/sylphy-.git
cd sylphycp .env.example .envOpen .env and fill in:
PRIVATE_KEY=0xYourWalletPrivateKey
ARBITRUM_SEPOLIA_RPC_URL=https://sepolia-rollup.arbitrum.io/rpc
ARBISCAN_API_KEY=YourArbiscanApiKeycd frontend
npm install
npm run devOpens at
http://localhost:5173/dashboard.html
# In a new terminal tab
cd backend
npm install
npm run devAPI running at
http://localhost:4000— auto-restarts on file change
- Open
http://localhost:5173/dashboard.html - Connect your wallet (MetaMask on Arbitrum Sepolia)
- Go to OTC Desk → Submit BUY 5000 RLC @ $1.40
- Submit SELL 5000 RLC @ $1.30
- Toast: 🎯 MATCHED! 5000 RLC @ $1.35
- Check Settlements → your match appears live
- Check Audit Log → encrypted entry created
# Install root dependencies
npm install
# Compile contracts
npx hardhat compile
# Deploy to Arbitrum Sepolia
npx hardhat run scripts/deploy.ts --network arbitrumSepolia
# Verify on Arbiscan
npx hardhat run scripts/verify.ts --network arbitrumSepolia| Layer | Technology | Version | Purpose |
|---|---|---|---|
| UI Framework | React | 18 | Component-based dashboard |
| Build Tool | Vite | 5.x | Fast dev server + bundling |
| Wallet | RainbowKit | 2.x | Wallet connection modal |
| Chain Hooks | Wagmi | 2.x | React hooks for Ethereum |
| Async State | TanStack Query | 5.x | Cache + refresh on-chain data |
| Smart Contracts | Solidity | 0.8.24 | On-chain settlement logic |
| Dev Framework | Hardhat | 2.x | Compile, test, deploy |
| Contract Libs | OpenZeppelin | 5.x | AccessControl, Pausable, ERC-20 |
| Network | Arbitrum Sepolia | — | L2 testnet (Chain ID: 421614) |
| API | Express.js | 4.x | REST intent API |
| Storage | JSON file (Node fs) | — | Zero-dependency persistence |
| Frontend Deploy | Vercel | — | CDN + edge deployment |
| Backend Deploy | Railway | — | Always-on Node.js server |
- Smart contract suite (Compliance, AuditLog, Settlement)
- React dashboard with RainbowKit wallet connection
- Intent submission API + price-time-priority matching engine
- Live settlements and audit log from backend
- Contract verification on Arbiscan
- Deploy backend to Railway (always-on)
- Real TEE integration (Nox Protocol production enclave)
- Multi-token support (WBTC, stablecoins)
- Regulator dashboard (decryption interface)
- Mainnet deployment
MIT License — Copyright © 2026 Sylphy Protocol
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software to use, copy, modify, merge, publish, and/or
distribute it, subject to the conditions in the LICENSE file.
Built with 🌊 on Arbitrum