Skip to content

Implement Cross-Venue Timing Correlation to Detect Coordinated Pump-and-Dump Across DEXes #211

Description

@Inkman007

Description

Pump-and-dump schemes on the Stellar DEX often involve coordinated buying across multiple venues (SDEX, AMM pools, and sometimes Ethereum DEX) to create the appearance of organic demand before the dump. The existing detection/cross_venue_features.py computes SDEX ↔ AMM coordination features but does not measure timing synchrony across more than two venues. This issue asks you to implement a multi-venue timing correlation detector that identifies wallets executing coordinated trades across 3+ venues within tight time windows.

What needs to be built

  • Extend detection/cross_venue_features.py with compute_multi_venue_timing_correlation(wallet_id, venues, window_seconds) that computes a cross-venue synchrony score using the Pearson correlation coefficient of per-venue trade volume time series (binned into 1-second buckets).
  • Venues: SDEX order book, AMM pools (each pool is its own venue), and Ethereum DEX (if identity graph has a linked address).
  • Add the synchrony score as multi_venue_sync_score feature.
  • Emit a structured alert when multi_venue_sync_score > 0.85 via the existing monitoring/alert_dispatcher.py.

Requirements

Functional

  • Time series binning must align across venues using UTC epoch seconds.
  • Must handle venues with no activity in the window (all-zero time series): treat as uncorrelated, not as division-by-zero error.

Testing

  • Unit test: two perfectly synchronised venues (same trade at the same second) must produce correlation = 1.0.
  • Unit test: one active venue and one silent venue must produce correlation = 0.0.
  • Test: alert fires when sync score exceeds threshold.

Security

  • The alert payload must not include raw trade amounts; include only the sync score, time window, and wallet ID hash.

Documentation

  • Update docs/cross_venue_detection.md with the multi-venue timing correlation algorithm, the alert threshold rationale, and known limitations (correlation ≠ causation).

Contributor guidance

Area of specialty: Financial data analysis, cross-chain analytics, Python, statistics.

How to contribute:

  1. Comment describing your experience with cross-venue or cross-asset correlation analysis.
  2. Propose how to handle the case where the Ethereum DEX data has higher latency than Stellar (introducing timing misalignment).
  3. PR must include both unit tests and the alert integration.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions