|
| 1 | +# Dataset Card — LedgerLens Labelled Stellar SDEX Wash-Trade Dataset |
| 2 | + |
| 3 | +## Dataset Summary |
| 4 | + |
| 5 | +A labelled feature dataset for detecting wash trading on the Stellar Decentralised Exchange |
| 6 | +(SDEX). Each row represents one wallet observed within a defined data window and carries |
| 7 | +the full 30+ feature vector produced by `detection/feature_engineering.py::build_feature_matrix`, |
| 8 | +plus ground-truth labels and provenance metadata. |
| 9 | + |
| 10 | +## Dataset Details |
| 11 | + |
| 12 | +| Field | Value | |
| 13 | +|---|---| |
| 14 | +| **Version** | 1.0.0 | |
| 15 | +| **Release date** | 2026-06-19 | |
| 16 | +| **Licence** | MIT (same as the LedgerLens project) | |
| 17 | +| **Data source** | Stellar Horizon public API | |
| 18 | +| **Data window** | 2024-01-01 to 2024-06-30 | |
| 19 | +| **Asset pairs covered** | USDC/XLM, BTC/XLM, AQUA/XLM | |
| 20 | +| **Format** | Apache Parquet | |
| 21 | +| **Path** | `data/labelled_dataset.parquet` | |
| 22 | + |
| 23 | +## Schema |
| 24 | + |
| 25 | +### Feature columns (from `build_feature_matrix`) |
| 26 | + |
| 27 | +| Column | Type | Description | |
| 28 | +|---|---|---| |
| 29 | +| `wallet` | str | Stellar public key | |
| 30 | +| `benford_chi_square_{1,4,24,168,720}h` | float | Benford chi-square statistic per rolling window | |
| 31 | +| `benford_mad_{1,4,24,168,720}h` | float | Benford Mean Absolute Deviation per rolling window | |
| 32 | +| `benford_z_max_{1,4,24,168,720}h` | float | Max per-digit Z-score per rolling window | |
| 33 | +| `counterparty_concentration_ratio` | float | Fraction of volume with single counterparty | |
| 34 | +| `round_trip_frequency` | float | Proportion of trades that are round-trips | |
| 35 | +| `self_matching_rate` | float | Rate of self-matched buy/sell orders | |
| 36 | +| `order_cancellation_rate` | float | Fraction of manage-offer ops that were cancellations | |
| 37 | +| `volume_per_counterparty_ratio` | float | Total volume / number of unique counterparties | |
| 38 | +| `intra_minute_clustering` | float | Fraction of minute buckets with > 1 trade | |
| 39 | +| `off_hours_activity_ratio` | float | Proportion of trades in UTC 00:00–05:00 | |
| 40 | +| `volume_spike_frequency` | float | Fraction of trades exceeding 3× rolling mean volume | |
| 41 | +| `funding_source_similarity` | float | Max Jaccard similarity of funding ancestors | |
| 42 | +| `network_centrality` | float | Degree centrality in the funding graph | |
| 43 | +| `account_age_days` | float | Account age at the time of last trade in window | |
| 44 | + |
| 45 | +### Label and provenance columns |
| 46 | + |
| 47 | +| Column | Type | Description | |
| 48 | +|---|---|---| |
| 49 | +| `label` | int (0 or 1) | 1 = wash trading, 0 = legitimate | |
| 50 | +| `labelling_signal` | str | `roundtrip_and_graph` / `roundtrip_only` / `graph_only` / `clean` / `manual` | |
| 51 | +| `review_notes` | str | Human reviewer rationale (empty string if not manually reviewed) | |
| 52 | +| `data_window_start` | str (ISO datetime) | Start of the data window used to compute features | |
| 53 | +| `data_window_end` | str (ISO datetime) | End of the data window used to compute features | |
| 54 | +| `n_trades` | int | Number of trades used to build the feature row | |
| 55 | + |
| 56 | +## Class Balance |
| 57 | + |
| 58 | +| Class | Count | Fraction | |
| 59 | +|---|---|---| |
| 60 | +| Wash trading (label = 1) | ≥ 200 | ≥ 40% | |
| 61 | +| Legitimate (label = 0) | ≥ 300 | ≥ 60% | |
| 62 | +| Excluded (label = NaN) | variable | excluded from released file | |
| 63 | + |
| 64 | +> **Note:** Grey-zone wallets (flagged by only one signal or with insufficient trade history) |
| 65 | +> are excluded from the released Parquet (`label = NaN` rows are dropped before writing). |
| 66 | +
|
| 67 | +## Labelling Methodology |
| 68 | + |
| 69 | +See `data/labelling_notes.md` for the full methodology, signal descriptions, and manual |
| 70 | +review notes. |
| 71 | + |
| 72 | +The conservative two-signal rule minimises false positives: |
| 73 | +- **Positive (label = 1):** flagged by BOTH round-trip detection AND funding-graph clustering. |
| 74 | +- **Negative (label = 0):** no flags from either signal, > 50 trades, > 5 distinct counterparties. |
| 75 | + |
| 76 | +## Reproducibility |
| 77 | + |
| 78 | +The build pipeline is fully deterministic given the same Horizon data window and parameters. |
| 79 | +See `data/build_config.json` for the exact configuration used to produce this release. |
| 80 | + |
| 81 | +```bash |
| 82 | +# Reproduce the dataset |
| 83 | +python -m scripts.build_labelled_dataset \ |
| 84 | + --trades data/raw_trades.parquet \ |
| 85 | + --output data/labelled_dataset.parquet \ |
| 86 | + --config data/build_config.json |
| 87 | +``` |
| 88 | + |
| 89 | +## Known Biases and Limitations |
| 90 | + |
| 91 | +1. Three asset pairs only — does not cover all SDEX activity. |
| 92 | +2. Round-trip window of 100 ledgers may miss slow wash-trading rings. |
| 93 | +3. Funding-graph features require account-activity data; when unavailable, graph signal defaults |
| 94 | + to 0 and wallets fall into the grey zone. |
| 95 | +4. Temporal coverage: 2024-01-01 to 2024-06-30 only. |
| 96 | +5. Legitimate wallets are identified by absence of flags + trade volume thresholds, not |
| 97 | + by positive evidence of legitimacy. |
| 98 | + |
| 99 | +## Ethics Statement |
| 100 | + |
| 101 | +All data is sourced exclusively from the **public Stellar Horizon API** |
| 102 | +(https://developers.stellar.org/api/horizon). No private or off-chain data was used. |
| 103 | + |
| 104 | +Wallet addresses in this dataset are **Stellar public keys on a permissionless blockchain**, |
| 105 | +which are inherently public by design. Publishing these keys does not reveal personal |
| 106 | +identifying information. The Stellar protocol is designed to be transparent and auditable. |
| 107 | + |
| 108 | +This dataset is released as an open-source public good under the MIT licence. Its purpose |
| 109 | +is to improve the quality of wash-trade detection for the benefit of the Stellar ecosystem. |
| 110 | + |
| 111 | +## Citation |
| 112 | + |
| 113 | +If you use this dataset, please cite: |
| 114 | + |
| 115 | +``` |
| 116 | +LedgerLens Data (2026). Labelled Stellar SDEX Wash-Trade Dataset v1.0.0. |
| 117 | +https://github.com/Ledger-Lenz/Ledgerlens-data |
| 118 | +``` |
| 119 | + |
| 120 | +## Licence |
| 121 | + |
| 122 | +MIT — see [LICENSE](../LICENSE) |
0 commit comments