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:
- Comment describing your experience with cross-venue or cross-asset correlation analysis.
- Propose how to handle the case where the Ethereum DEX data has higher latency than Stellar (introducing timing misalignment).
- PR must include both unit tests and the alert integration.
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.pycomputes 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
detection/cross_venue_features.pywithcompute_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).multi_venue_sync_scorefeature.multi_venue_sync_score > 0.85via the existingmonitoring/alert_dispatcher.py.Requirements
Functional
Testing
Security
Documentation
docs/cross_venue_detection.mdwith 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: