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.
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.
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.
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.
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.
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.
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.
| Provider | Solana | Mantle | Data | Poll Interval |
|---|---|---|---|---|
| CoinGecko | Yes | Yes | Price + per-pool liquidity (summed from pools, not pre-calculated) | 60s |
| Birdeye | Yes | Yes | Price + bilateral liquidity (via multi_price with include_liquidity) |
5 min |
| Solscan | Yes | No | Price + liquidity (per-token fetch) | 60s |
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.
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 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.
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.