DEV Community

G bot
G bot

Posted on

G-BOT: Real-Time Pump.fun Token Hunter — Architecture & How It Works

G-BOT: Real-Time Pump.fun Token Hunter

G-BOT is an autonomous Solana token intelligence system built to monitor pump.fun in real time, score new tokens, and alert users to gems — while aggressively filtering rugs before they happen.


Architecture Overview

PumpPortal WebSocket ──► Trade Stream ──► Pending Queue ──► processToken()
        │                                                         │
  RPC Listener ──────────────────────────────────────────────────┤
        │                                                         │
DexScreener Polling ──► Fallback Queue                           │
                                                                  ▼
                                                    filterToken() → scoreToken()
                                                         │              │
                                                   Holder Analysis   Creator Check
                                                   (Helius RPC)    (PumpPortal API)
                                                         │              │
                                                         └──────────────┘
                                                                  │
                                                         Telegram Notification
                                                                  │
                                                          Rug Alarm Watch
Enter fullscreen mode Exit fullscreen mode

Detection Layer

G-BOT runs three parallel detection methods:

1. PumpPortal WebSocket (Primary)

Connects to wss://pumpportal.fun/api/data — receives every new token creation event in real time with metadata: name, symbol, creator wallet, bonding curve address, social links, and initial SOL.

2. Helius RPC Listener

Listens to Solana transactions on-chain via Helius WebSocket. Catches tokens that PumpPortal might miss, though without full metadata.

3. DexScreener Polling (Fallback)

Polls DexScreener every few seconds for new Solana pairs. Used as a fallback for tokens that need more volume data before scoring.


Trade Stream — Real-Time Data Collection

When a new token is detected, it is immediately subscribed to in the PumpPortal Trade Stream. Over a 30–90 second window, G-BOT accumulates:

  • uniqueBuyers and uniqueSellers (distinct wallet sets)
  • volumeSOL and volumeUSD
  • whaleBuys (single buys ≥ 3 SOL)
  • latestBCSolIn (live bonding curve progress)
  • creatorSold flag (dev sell detection)

If buy thresholds are met early (e.g. a whale buys), the token exits the window immediately. If sell pressure dominates (sellers ≥ buyers with < 25 buyers), the token is routed to the DexScreener fallback for deeper analysis.


Scoring System (0–100)

Every token is scored across 6 dimensions:

Category Max What it measures
Social 20 Twitter + Telegram + Website validity
Safety 25 Dev sold, bundle detection, holder concentration
Momentum 20 5m price change, volume acceleration
Community 15 Unique buyers, organic vol/buyer ratio
Buy Pressure 10 Buy/sell ratio, whale interest
Bonding Curve 10 Progress toward graduation (85 SOL)

Key caps and penalties:

  • Anonymous dev + < 20 buyers → score capped at 36
  • Website-only (no Twitter/Telegram) → social score treated same as anonymous
  • Fake/invalid social links → score capped at 42
  • Bundled launch (> 90 SOL initial) → score capped at 30
  • Top-3 holders > 50% → score −20
  • Top-3 holders > 30% → score −10
  • More sells than buys → score −8

Notification threshold: 54/100


Holder Analysis (Helius RPC)

Before scoring, G-BOT fetches live holder data using a 2-call batch:

  1. getTokenLargestAccounts → top 20 token accounts
  2. getMultipleAccounts → owner resolution for all 20 at once

This gives real-time holder concentration:

  • top3Pct — top 3 holder % of total supply
  • top10Pct — top 10 holder % of total supply
  • insiderPct — creator wallet holding %
  • distributionScore — 0–100 composite score

All data is persisted to SQLite and feeds directly into the main token score. Tokens with 100% concentration in top-3 (a classic rug setup) now score ~50 lower than before.


Creator Analysis (PumpPortal API)

Every creator wallet is analyzed in the background:

  1. Fetch all previous tokens via pumpportal.fun/api/coins-created?publicKey=WALLET
  2. For each previous token, check DexScreener volume (< $100/24h = dead = rug)
  3. Calculate quickDumpRatio = rugged / total
  4. Label: rug | suspicious | legit | unknown

If a creator has ≥ 3 previous tokens with ≥ 67% rug ratio → Serial Rugger Alert sent to all Telegram users.

When a token is marked as rugged, the creator's rug count increments automatically. Future tokens from the same wallet trigger instant alerts.


Website CA Verification

If a token has a linked website, G-BOT fetches its HTML and scans for Solana addresses using regex ([1-9A-HJ-NP-Za-km-z]{32,44}).

  • CA found and matches → ✅ Confirmed
  • CA found but different → ⚠️ Mismatch warning
  • No CA found → ℹ️ Not displayed
  • Site unreachable → ⚠️ Unreachable

IPFS Metadata Enrichment

PumpPortal sometimes sends social links inside the IPFS/Arweave metadata URI rather than as top-level fields. G-BOT detects this and fetches the metadata before scoring:

if (!hasAnySocial && token.metadataUri) {
  const meta = await fetch(metaUrl).then(r => r.json());
  token.twitter  = meta.twitter  || token.twitter;
  token.telegram = meta.telegram || token.telegram;
  token.website  = meta.website  || token.website;
}
Enter fullscreen mode Exit fullscreen mode

This prevents tokens with valid socials from being incorrectly scored as anonymous.


Rug Alarm — Post-Notification Price Monitor

Every token that receives a Telegram notification is added to a 20-minute watch list. Every 3 minutes, G-BOT checks the current price. If the price drops > 60% from the notification entry price:

🚨 RUG ALARM — $TOKEN
Price dropped 72% since notification!
⚠️ If you bought this token — consider exiting immediately.

The token is simultaneously marked as rug in the database and the creator's rug count is incremented.


DexScreener Boost Tracking

G-BOT polls DexScreener's boost API every 2 minutes. Tokens with active boosts ≥ $100 trigger a separate notification showing: boost amount, token stats, and score.


Graduation Detector

Monitors the pump.fun bonding curve. When a token accumulates 85 SOL and migrates to Raydium, a graduation notification is sent to all users.


Database Schema (SQLite)

Table Purpose
tokens Every detected token with scores, holder data, status
creator_wallets Creator history: rug count, quick dump ratio, label
wallet_links Fund flow between wallets (rug network detection)
smart_wallets Early buyer behavior tracking
wallet_activity Per-token wallet entries
telegram_chats Active bot users and groups
notifications Notification history

Tech Stack

  • Runtime: Node.js + TypeScript (ts-node)
  • Blockchain: Solana Web3.js, Helius RPC
  • Data: PumpPortal WebSocket API, DexScreener API, Helius Enhanced TX API
  • Database: better-sqlite3 (WAL mode)
  • Notifications: Telegram Bot API (multi-language: EN, TR, ZH)
  • Process Manager: PM2
  • Infrastructure: Linux VPS

Current Version: 2.4.0

Version Key Addition
2.4.0 Holder analysis integrated into scoring, Rug Alarm
2.3.0 Fake link detection, stricter social validation
2.2.0 RUG Blacklist alerts, Website CA checker
2.1.0 PumpPortal Trade Stream
2.0.0 Creator Analyzer, Serial Rugger detection
1.9.0 Graduation Detector, Volume Acceleration
1.8.0 DexScreener Boost Tracker


Follow Live Signals

Get real-time token alerts directly on Telegram: @crytpoG_bot


G-BOT is continuously updated based on real-world rug patterns observed on pump.fun. Every rug that slips through becomes a data point for the next filter.


v2.5.0 Update — Smart Money Radar

The biggest feature addition to date: G-BOT now tracks the most profitable pump.fun wallets in real time.

Architecture Addition


Gmgn.ai API (top traders) Internal DB (wallet_activity PnL)
\ /
\_____________________________/
|
smart_money_radar.ts
[Hourly Discovery]
[Tier Assignment: S/A/B/C]
|
PumpPortal WebSocket
subscribeAccountTrade
|
Tracked wallet buys a token
|
Full G-BOT analysis pipeline
(holder + creator + scorer)
|
Telegram: 🐋 SMART MONEY ALERT

How Discovery Works

Every 60 minutes:

  1. Fetch top 50 pump.fun traders from Gmgn.ai by 7-day PnL
  2. Cross-reference with internal wallet_activity table (accumulated from monitored tokens)
  3. Calculate win rate, assign tier, set is_tracked = 1 in smart_wallets table
  4. Subscribe new wallets to PumpPortal subscribeAccountTrade WebSocket without restart

Data Flow on Buy Detection

  1. PumpPortal fires xType: "buy" for a tracked wallet
  2. handleSmartMoneyBuy() deduplicates (5-minute cooldown per wallet+mint pair)
  3. getTokenStats() fetches current market data from DexScreener
  4. scoreToken() runs the full 100-point scoring engine
  5. otifySmartMoney() broadcasts to all active Telegram chats

Join live signals: @crytpoG_bot


Scorer Hotfix — Rug Pattern Detection (Mar 19, 2026)

Two new pattern-based penalties added to scorer.ts following post-mortem analysis:

Fresh Twitter Account Pattern

` ypescript
// In scorer.ts — social scoring section
const handleBase = rugSuffixes.reduce((h, s) =>
h.replace(new RegExp(s + "$"), ""), handleRaw);

if (handleBase === symbolNorm || handleRaw.startsWith(nameNorm)) {
social = Math.max(3, social - 3);
warnings.push("⚠️ Twitter handle matches token name — likely freshly created account");
}
`

Common rug suffixes stripped before comparison: live, coin, oken, sol, official,
eal, un, io, xyz, wtf

AI Description Pattern

` ypescript
const aiPatterns = [
"fast lane", "fuels itself", "hop into", "driver's seat",
"moon mission", "to the moon", "revolutionary", "game-changing", ...
];

if (!hasAiPattern && !isSelfReferential) {
social = Math.min(20, social + 3); // only genuine descriptions earn this
signals.push("📝 Detailed description");
} else if (hasAiPattern) {
warnings.push("⚠️ Generic/AI description — no real substance");
}
`

Real Case: AUTOCOIN

Factor Before Fix After Fix
Twitter utocoinlive +6 pts +3 pts (-3 penalty)
AI description +3 pts bonus 0 pts + warning
Total social ~9/20 ~3/20
Recommended? ✅ Yes (rugged) ❌ No

Join live signals: @crytpoG_bot

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.