Skip to content

clstr-labs/clstr

Repository files navigation

clstr banner

DNpfRsBDBYYG5x1QkBBtjmrDt5Ci1ona3mJm3jrLpump

clstr

Zero-knowledge wallet cluster analysis on Solana

Build License Solana Website Twitter


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

Architecture

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
Loading

Features

  • 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

Installation

git clone https://github.com/clstr-labs/clstr.git
cd clstr

Build the Anchor Program

anchor build

Install SDK Dependencies

cd sdk
npm install

Build the CLI

cargo build --release -p clstr-cli

Usage

Flag a Wallet

import { ClstrClient } from "./clstr-sdk";

const client = new ClstrClient(program, provider);
await client.flagWallet(targetPubkey, riskScore, zkProofHash);

Run Clustering

clstr-cli cluster --input transactions.json --output clusters.json

Verify a ZK Proof

clstr-cli verify --proof proof.json --commitment 0xabc123

Configuration

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

Contributing

See CONTRIBUTING.md for guidelines.


License

MIT License. See LICENSE for details.


Built on Solana.

About

Three-headed token launch intelligence for Solana. Nothing passes unjudged.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors