Zero-knowledge wallet cluster analysis on Solana
clstr is a Solana-native wallet clustering protocol that combines on-chain burn-and-flag mechanics with off-chain zero-knowledge proofs and graph analysis. The system monitors wallet behaviors, clusters related addresses using the Louvain algorithm, and publishes tamper-proof risk scores on-chain.
| Component | Description |
|---|---|
| clstr_core | Anchor program handling burn, flag, and score operations |
| clstr_math | Louvain clustering and graph utilities in pure Rust |
| sdk | TypeScript client for interacting with the on-chain program |
| cli | Command-line tool for operators and validators |
flowchart TD
A[Solana RPC] -->|Transaction stream| B[Ingestion Layer]
B --> C[ZK Proof Engine]
C --> D[Louvain Clustering]
D --> E[Risk Scorer]
E --> F[clstr_core Program]
F --> G[Solana Blockchain]
subgraph Off-Chain
B
C
D
E
end
subgraph On-Chain
F
G
end
style A fill:#1a1a1a,stroke:#DC143C,color:#ffffff
style B fill:#1a1a1a,stroke:#DC143C,color:#ffffff
style C fill:#1a1a1a,stroke:#DC143C,color:#ffffff
style D fill:#1a1a1a,stroke:#DC143C,color:#ffffff
style E fill:#1a1a1a,stroke:#DC143C,color:#ffffff
style F fill:#DC143C,stroke:#ffffff,color:#ffffff
style G fill:#DC143C,stroke:#ffffff,color:#ffffff
- On-chain burn-and-flag mechanism via Anchor program
- Zero-knowledge proof generation using SHA-256 commitments
- Louvain community detection for wallet clustering
- Real-time transaction monitoring via Solana RPC webhooks
- TypeScript SDK for seamless dApp integration
- CLI tooling for validators and operators
- Configurable risk thresholds and scoring parameters
git clone https://github.com/clstr-labs/clstr.git
cd clstranchor buildcd sdk
npm installcargo build --release -p clstr-cliimport { ClstrClient } from "./clstr-sdk";
const client = new ClstrClient(program, provider);
await client.flagWallet(targetPubkey, riskScore, zkProofHash);clstr-cli cluster --input transactions.json --output clusters.jsonclstr-cli verify --proof proof.json --commitment 0xabc123| Variable | Description | Default |
|---|---|---|
SOLANA_RPC_URL |
Solana RPC endpoint for connections and webhooks | - |
CLUSTER_RESOLUTION |
Louvain resolution parameter | 1.0 |
MIN_RISK_THRESHOLD |
Minimum score to trigger a flag | 0.65 |
ZK_HASH_ROUNDS |
Number of SHA-256 iterations | 256 |
PROGRAM_ID |
Deployed program address | E1iTSqt1YkW6LoNXMspEoxsdotzEdmn3QjEJL5R3NUwe |
See CONTRIBUTING.md for guidelines.
MIT License. See LICENSE for details.
Built on Solana.
