███████╗██╗ ██╗██╗ ██╗███████╗███████╗██╗ ███████╗
██╔════╝██║ ██║██║ ██║██╔════╝██╔════╝██║ ██╔════╝
███████╗███████║██║ ██║█████╗ █████╗ ██║ █████╗
╚════██║██╔══██║██║ ██║██╔══╝ ██╔══╝ ██║ ██╔══╝
███████║██║ ██║╚██████╔╝██║ ██║ ███████╗███████╗
╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝
Private trading. Public liquidity. Best execution.
$1.5B+ extracted by MEV bots on Solana annually. Every trade signals your intentions to the entire network. Bots frontrun you. Competitors see your accumulation strategy. Institutions can't place large orders without moving markets.
DeFi has a fundamental transparency problem.
Shuffle is the first protocol to bridge Privacy 2.0 encrypted computation with public DEX liquidity.
| Step | What Happens | Privacy |
|---|---|---|
| 🛡️ Shield | Deposit SPL tokens into encrypted balances | Only you can see your balance |
| 🔄 Trade | Place encrypted orders (pair, direction, amount all hidden) | Orders aggregate privately |
| 💰 Settle | Automatic pro-rata payouts on next interaction | Settlement amounts encrypted |
No tradeoffs. Privacy AND best price via Jupiter's $4B+ liquidity.
flowchart TB
subgraph User["👤 User"]
Wallet["Wallet + x25519 Key"]
end
subgraph SDK["📦 Shuffle SDK/CLI"]
Encrypt["Encrypt orders locally"]
Decrypt["Decrypt balances"]
end
subgraph Solana["⛓️ Solana"]
Program["Shuffle Program (Anchor)"]
Vaults["SPL Token Vaults"]
end
subgraph Arcium["🔐 Arcium MPC"]
Circuits["8 Custom Circuits"]
end
subgraph External["🌐 External"]
Jupiter["Jupiter Aggregator"]
Helius["Helius RPC + Cranker"]
end
Wallet --> Encrypt --> Program
Program <--> Circuits
Program --> Vaults
Program -.->|Net surplus swap| Jupiter
Helius -.->|Batch trigger| Program
Program --> Decrypt --> Wallet
For technical deep-dive, see:
We built 8 custom Arcis circuits for on-chain encrypted computation:
| Circuit | Purpose | Code |
|---|---|---|
add_balance |
Deposit to encrypted balance | encrypted-ixs/src/lib.rs |
sub_balance |
Withdraw from encrypted balance | ↑ |
transfer |
Atomic P2P transfer | ↑ |
init_batch_state |
Create encrypted batch | ↑ |
accumulate_order |
Add order to batch, deduct from user | ↑ |
reveal_batch |
Decrypt aggregate totals for netting | ↑ |
calculate_payout |
Pro-rata settlement computation | ↑ |
Key integration points:
- MXE encrypted shared state (
Enc<Shared, T>andEnc<Mxe, T>) - Computation callbacks for async MPC results
- x25519 key exchange for user-side decryption
| Component | Integration |
|---|---|
| RPC | Devnet/Mainnet node access for all transactions |
| Cranker | Automated batch trigger when thresholds met (≥8 orders, ≥2 active pairs) |
| Component | Integration |
|---|---|
| Anchor 0.32 | Smart contract framework with PDAs |
| SPL Tokens | 4 assets: USDC, TSLA, SPY, AAPL |
| Jupiter CPI | Net surplus routing for best execution |
npm install -g @shuffle/cli# Create your privacy account
shuffle init
# View encrypted balances (decrypts locally)
shuffle balance
# Deposit tokens into privacy account
shuffle deposit USDC 1000
# Place encrypted order
shuffle order TSLA_USDC buy 500
# Check order status
shuffle status
# Settle after batch execution
shuffle settleimport { ShuffleClient, AssetId, PairId, Direction } from "@shuffle/cli";
// Initialize client
const client = await ShuffleClient.create({ connection, wallet });
client.initEncryption(yourX25519PrivateKey);
// Create privacy account
await client.createUserAccount();
// Deposit and trade
await client.deposit(AssetId.USDC, 1_000_000_000); // 1000 USDC
await client.placeOrder(PairId.TSLA_USDC, Direction.BtoA, 500_000_000);
// Check balance (decrypts all 4 assets)
const balances = await client.getBalance();
console.log("USDC:", balances.usdc);🎥 Video Demo: [Link]
# Clone and setup
git clone https://github.com/your-repo/sol-privacy-mvp
cd sol-privacy-mvp/contract
# Build with Arcium
arcium build
# Run tests
arcium test| Data | Encrypted? | Who Can See |
|---|---|---|
| User balances | ✅ Yes | User only (decrypts locally) |
| Order pair/direction/amount | ✅ Yes | User only |
| Settlement payouts | ✅ Yes | User only |
| Account exists | ❌ No | Public |
| Batch order count | ❌ No | Public |
| Aggregate totals (post-batch) | ❌ No | Public |
We're surgical about privacy—see Data Visibility Matrix.
| Bulldozer | @BulldozerFi — DeFi developer with neobank clients, mainnet deployments securing user funds, cybersecurity background |
| Tothster | @itstothster — Experienced DeFi builder, mainnet dapps, cybersecurity foundations |
Built in a single hackathon sprint. 🚀
sol-privacy-mvp/
├── contract/ # Anchor + Arcium smart contract
│ ├── programs/ # Shuffle Program (Rust)
│ ├── encrypted-ixs/ # Arcis MPC circuits
│ └── tests/ # Integration tests
├── sdk/ # TypeScript SDK + CLI
├── frontend/ # Next.js 14 app
├── faucet/ # Test token faucet
└── docs/ # Technical documentation
Private trading. Public liquidity. Best execution.
Built with ❤️ on Solana using Arcium MPC + Helius