Phase 2 transforms raw trade and signal data into structured intelligence about tokens, creators, and wallet relationships. While Phase 1 asks how good a wallet is, Phase 2 asks what is happening around a token right now — and whether that activity is organic. Six services run concurrently, each building a different layer of understanding that feeds into Phase 3 ML inference and the live trader.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/0xW1re/solvedocs/llms.txt
Use this file to discover all available pages before exploring further.
Services overview
SignalScorer
Computes a composite rule-based score for each signal, combining wallet alpha, velocity, buy rank, lifecycle state, and creator risk.
TokenLifecycle
Classifies every active token into one of 8 lifecycle states every 60 seconds using real-time velocity and age data.
BundleDetector
Identifies coordinated buy clusters using 5-second time buckets. Runs every 10 minutes across the last 15 minutes of trades.
CreatorRiskScorer
Builds a risk profile for every token creator with 2 or more tokens, updated every 30 minutes.
CoOccurrence
Maintains a wallet-pair co-buy frequency matrix, tracking timing, directionality, and delay consistency.
GraphBuilder
Runs graph analysis hourly to identify wallet clusters and compute cluster-level features for the ML model.
TokenLifecycle
TheTokenLifecycle classifier assigns every active, non-graduated token a lifecycle state every 60 seconds. It uses real-time velocity data — buys and sells in the last 60 and 300 seconds — alongside token age to determine which of 8 states the token occupies.
| State | Description |
|---|---|
launch | Token is under 60 seconds old |
early_accumulation | Under 5 minutes old with rising buy pressure |
momentum | Sustained buy velocity with new unique buyers entering |
euphoria | High velocity, strong SOL inflow, aggressive price action |
distribution | Smart wallets selling into retail buying — a key exit signal |
decline | Falling velocity, sell pressure increasing |
dead | No trades for 5 or more minutes |
graduated | Token has crossed 85 SOL and moved to Raydium |
BundleDetector
TheBundleDetector identifies coordinated buy activity on a token: groups of wallets buying within the same 5-second time window, potentially as part of a sniping or pump-and-dump operation.
It runs every 10 minutes, scanning the last 15 minutes of trades. On first startup, it also performs a historical scan of the last 24 hours in 2-hour chunks.
Detection logic
For each token, trades are grouped into 5-second time buckets. Any bucket with 3 or more distinct wallets is a cluster candidate. The detector then scores each cluster:
| Signal | Confidence boost |
|---|---|
| Amount coefficient of variation < 0.3 (similar buy sizes) | +25% |
| Buy rank span ≤ wallet count (consecutive entries) | +20% |
| Cluster size ≥ 5 wallets | +15% |
| Cluster size ≥ 10 wallets | +10% |
detected_bundles. The detection method is one of time_window, similar_amounts, or same_slot_coordinated, depending on which signals are most prominent.
Side effects
For every detected bundle, all wallet pairs in the cluster are written to wallet_co_occurrence with an incremented overlap count. This data feeds both the CoOccurrence analysis and the CopyTradeDetector in Phase 3.
CreatorRiskScorer
TheCreatorRiskScorer builds a risk profile for every token creator with 2 or more tokens, updated every 30 minutes. It computes:
| Metric | Description |
|---|---|
| Rug rate | Share of tokens that died within 10 minutes of launch and never graduated |
| Avg insider presence | Average insider count across this creator’s tokens |
| Avg bot buyer pct | Average share of buyers classified as bots across all tokens |
| Serial velocity | Rate of token creation — tokens per day over the last 30 days |
| Risk score | Weighted composite score from 0 to 100 |
AntiSignalEmitter in Phase 3.
CoOccurrence
TheCoOccurrence service builds and maintains a wallet-pair co-occurrence matrix in the wallet_co_occurrence table. Every time two tracked wallets buy the same token within a short window, their pair’s buy_overlap_count is incremented.
Additional fields tracked per pair:
| Field | Description |
|---|---|
avg_buy_delta_seconds | Average time between wallet A’s buy and wallet B’s buy |
buy_delta_stddev | Consistency of the delay across all co-occurrences |
a_buys_first_ratio | How often wallet A buys before wallet B (directional indicator) |
CopyTradeDetector in Phase 3, which uses the directional consistency and delay distribution to classify copy-trade relationships.
GraphBuilder
TheGraphBuilder runs every hour and spawns a Python subprocess (src/ml/graph_builder.py) to perform graph-level analysis on the wallet_co_occurrence data. Graph algorithms identify wallet clusters — groups of wallets that co-buy frequently — and compute cluster-level features:
| Feature | Description |
|---|---|
cluster_size | Number of wallets in the cluster |
cluster_avg_grad_rate | Average graduation rate across wallets in the cluster |
co_occurrence_max_score | Highest co-occurrence score for the signal’s wallet |
SignalScorer
TheSignalScorer computes a composite rule-based score for each signal. This score is stored as rule_score and used as a fallback when ML inference is unavailable or disabled. It combines:
- Wallet alpha score at time of signal
- Token velocity (buys per minute)
- Buy rank (how early the entry was)
- Token lifecycle state
- Creator risk score