Enabling fully private order matching on Solana using Arcium's encrypted compute platform
Shadow Match is a decentralized order book implementation that leverages Arcium's encrypted compute capabilities to enable fully private order matching on Solana. It protects sensitive order information while maintaining the transparency and composability benefits of DeFi.
- 🔐 Encrypted Order Matching: Orders are matched privately using Arcium's FHE circuits
- 🏃 High Performance: Process matches at Solana speed with encrypted compute
- 🔍 Zero Knowledge: Orders are committed and executed without revealing details
- 💰 Escrow System: Secure token handling with automated settlement
- 🔄 Composable: Integrate with other DeFi protocols while maintaining privacy
The system consists of four main components:
-
Anchor Program (
/programs/shadow_match)- Handles on-chain state and account management
- Processes order commitments and settlement
- Manages token escrow and user accounts
-
Encrypted Instructions (
/encrypted-ixs)- Implements private order matching logic using Arcium circuits
- Processes orders without revealing price or quantity
- Generates zero-knowledge proofs for valid matches
-
Relayer Service (
/relayer)- Facilitates communication between clients and Arcium network
- Manages encrypted order queue and matching
- Submits proofs and executes matches on-chain
-
TypeScript SDK (
/sdk)- Client library for interacting with Shadow Match
- Handles order encryption and commitment generation
- Provides easy-to-use APIs for traders
- Rust toolchain (nightly)
- Node.js >= 16
- Solana CLI tools
- Arcium SDK and CLI
# Clone the repository
git clone https://github.com/yourusername/shadow-match.git
cd shadow-match
# Install dependencies
yarn install
# Build Anchor program and encrypted circuits
anchor build
arcium build# Start local validator
solana-test-validator
# Run integration tests
yarn testDetailed documentation is available in the /docs directory: