Skip to content
@Ledger-Lenz

Ledgerlens-xyz

Open-source wash trading detection for the Stellar DEX — Benford's Law + ML on Soroban

LedgerLens 🔍

Built on Stellar Soroban Smart Contracts License: MIT

Hybrid On-Chain Fraud Detection for the Stellar DEX

Detecting Wash Trading and Artificial Volume Using Benford's Law + Ensemble Machine Learning on Soroban


"On a transparent ledger, every transaction is visible. LedgerLens makes them legible."


What We Build

LedgerLens is an open-source fraud detection system for the Stellar Decentralised Exchange (SDEX). It ingests trade data from the Stellar Horizon API, scores wallets and asset pairs for wash-trading risk, and exposes those scores through a public REST API, a web dashboard, and a Soroban smart contract so other protocols can query them natively.

Each wallet and trading pair receives a LedgerLens Risk Score (0–100) derived from:

  • Benford's Law digit-distribution analysis — chi-square, per-digit Z-scores, and Mean Absolute Deviation across rolling time windows
  • Ensemble ML classifiers (Random Forest, XGBoost, LightGBM) trained on 30+ on-chain features with SHAP interpretability

Repositories

Repository Stack What it does
.github YAML / Actions Org-wide CI/CD, issue/PR templates, community health files
Ledgerlens-data Python Ingestion pipeline, Benford engine, ML features, ensemble training/inference
Ledgerlens-core Python Shared detection engine, local FastAPI for development
Ledegerlens-api Python (FastAPI) Public REST API — /score, /alerts/recent, /assets/risk-ranking
Ledgerlens-dashboard JS/TS (React) Web dashboard — risk scores, alerts, asset risk rankings
Ledgerlens-contract Rust (Soroban) On-chain risk score registry — submit_score / get_score

Why It Matters

Wash trading is cheap and easy on Stellar — 3–5 second finality, sub-cent fees, and native DEX infrastructure mean bad actors can inflate volume at scale. LedgerLens is the first open-source, production-grade detection layer for the SDEX.

  • Traders get interpretable risk scores before placing orders
  • Asset issuers can demonstrate organic volume
  • Protocol teams can gate AMM and lending logic on LedgerLens scores natively via Soroban
  • The Stellar ecosystem gains a credible, auditable fraud detection layer

LedgerLens is an open-source public good — scores, methodology, and training data are fully transparent and will always be free to query.


Get Involved

We are actively looking for collaborators with experience in:

  • Stellar / Soroban smart contract development (Rust)
  • Python backend development and ML pipeline engineering
  • On-chain data analysis and blockchain forensics
  • Frontend development (React/TypeScript)
  • DeFi protocol integration

Read CONTRIBUTING.md to get started, or open an issue in any repository.


Built for the Stellar ecosystem as part of the Drip Wave builder programme. Open source. Community owned.

Popular repositories Loading

  1. Ledgerlens-core Ledgerlens-core Public

    Python 2 60

  2. Ledgerlens-contract Ledgerlens-contract Public

    Rust 2 99

  3. Ledgerlens-data Ledgerlens-data Public

    Python 2 73

  4. .github .github Public

  5. Ledegerlens-api Ledegerlens-api Public

    Python 2

  6. Ledgerlens-dashboard Ledgerlens-dashboard Public

    Python

Repositories

Showing 6 of 6 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…