Rules & Methodology

← Back to Dashboard
Monitoring Rules

Rugpull Monitor v2 uses four rule families to detect rug pulls, liquidity drains, and pump-and-dump schemes across Solana and Mantle tokens. All thresholds are loaded from config/rules.json at startup.

Loading rules from server...

How Snapshot Collection Works

The monitor polls multiple data providers on each cycle. CoinGecko and Solscan poll every 60 seconds; Birdeye polls every 5 minutes. Each poll captures current price and total liquidity and stores the result in an in-memory ring buffer keyed by token address and provider.

Ring Buffer (per-provider)

Each provider maintains its own snapshot history per token (~20 snapshots, ~20 min for 60s providers, ~100 min for Birdeye). Old snapshots are evicted automatically. The buffer is lost on process restart and rebuilds within the first few poll cycles.

Token: $EXAMPLE ├── coingecko (60s interval) │ ├── ts: now → LP: $167,631 Price: $0.001512 │ ├── ts: now - 1m → LP: $220,500 Price: $0.001601 │ ├── ts: now - 5m → LP: $235,100 Price: $0.001650 │ └── ts: now - 10m → LP: $240,000 Price: $0.001680 ├── birdeye (5m interval) │ ├── ts: now → LP: $172,000 Price: $0.001510 │ └── ts: now - 5m → LP: $238,000 Price: $0.001648 └── solscan (60s interval) ├── ts: now → LP: $165,800 Price: $0.001515 └── ts: now - 5m → LP: $233,500 Price: $0.001649
Rule Evaluation

Rules are evaluated per provider independently. Each provider's ring buffer is checked against the rule thresholds. Raw alerts from all providers are then deduped by (token, rule) — if multiple providers trigger the same rule, they produce one consolidated alert with source agreement info.

// For each active provider: prev = ringBuffer.find(provider, ts >= now - 300) // that provider's snapshot ~5m ago change = (current.lp - prev.lp) / prev.lp * 100 if (change <= -30) rawAlerts.push({ provider, ... }) // After all providers evaluated: dedup(rawAlerts) // group by (token, rule) → consolidated alerts

Alert Cooldown

Each (token, rule, severity) combination has an independent 5-minute cooldown to prevent alert spam during sustained events. A token can still trigger alerts for different rules or severities within the same window.

Example: If $TOKEN fires LP Drain (1m) Risk at 10:00, the next LP Drain (1m) Risk alert for that token is suppressed until 10:05. However, LP Drain (5m) High can still fire during this period if its own cooldown has expired.

Cooldowns are in-memory and reset on process restart. This is intentional — after a restart, all suppression is lifted so legitimate events are not missed during recovery.

Data Sources & Multi-Source Evaluation

Providers

v2 fetches price and liquidity data from multiple independent providers and evaluates rules against each provider's data separately. This cross-verification reduces false positives from stale or inaccurate data in any single source.

ProviderSolanaMantleDataPoll Interval
CoinGeckoYesYes Price + per-pool liquidity (summed from pools, not pre-calculated) 60s
BirdeyeYesYes Price + bilateral liquidity (via multi_price with include_liquidity) 5 min
SolscanYesNo Price + liquidity (per-token fetch) 60s
Source Agreement & Dedup

After each poll cycle, raw alerts from all providers are grouped by (token, rule). If multiple providers trigger the same rule for the same token, they are consolidated into a single alert showing how many sources agree.

// Example: LP Drain 5m triggered by 2 of 3 providers ✅ All sources agree (3/3): ← high confidence ⚠️ Partial agreement (1/3): ← MANUAL CHECK REQUIRED

Partial agreement alerts are flagged with MANUAL CHECK REQUIRED since a single-source trigger may indicate data lag rather than a real event. Each source's numbers are shown in the alert for manual comparison.

Birdeye Rate Limiting

Birdeye polls at a slower interval (5 min vs 60s) to conserve API credits (CU). The system checks remaining CU via Birdeye's /utils/v1/credits endpoint every 10 minutes. If remaining credits drop below 5%, Birdeye is halted permanently and a debug alert is sent. Resume manually via POST /api/providers/birdeye/resume.

Impact on short-window rules: Since Birdeye only polls every 5 minutes, the 1-minute and 2-minute rules (LP Drain 1m, Price Crash 2m) will never fire from Birdeye data — there's no snapshot close enough in its ring buffer. These short-window rules rely on CoinGecko (60s polling). Birdeye contributes to 5m+ rules as a cross-verification source.
LP Concentration (Solana only)

LP token holder distribution is fetched directly from Solana RPC by querying the token accounts of the LP mint for each pool. PumpSwap AMM and Raydium AMM v4 pools are supported. Checks run on a distributed 8-hour cycle (one token at a time). Mantle LP concentration is not yet implemented.

Supported Chains
Chain
Solana (SOL)
Chain
Mantle (MNT)