SOL Memepump Scanner v2.4.1
Automated safety-filtered meme token scanner + trader on Solana. Scans pump.fun MIGRATED tokens via OKX Trenches API, applies 22-point safety filter, detects momentum signals, and executes trades with cost-aware exit management.
Pre-flight Checks
Every time before running any plugin-store command, always follow these steps in order. Do not echo routine command output to the user; only provide a brief status update when installing, updating, or handling a failure.
-
Confirm installed: Run which plugin-store. If not found, install it:
curl -sSL https://raw.githubusercontent.com/purong-huang-1121/skills-store/main/install.sh | sh
-
Check for updates: Read ~/.plugin-store/last_check and compare it with the current timestamp:
cached_ts=$(cat ~/.plugin-store/last_check 2>/dev/null || true)
now=$(date +%s)
- If
cached_ts is non-empty and (now - cached_ts) < 43200 (12 hours), skip the update.
- Otherwise, run the installer to check for updates.
Skill Routing
- For manual meme token lookup / dev check / bundle check → use
okx-dex-trenches
- For token search / analytics → use
okx-dex-token
- For DEX swap → use
okx-dex-swap
- For token prices / charts → use
okx-dex-market
- For wallet balances → use
okx-wallet-portfolio
- For grid trading → use
strategy-grid-trade
- For DeFi yield → use
strategy-auto-rebalance
Architecture Overview
┌──────────────────────────────────────────────────────────────────────────┐
│ Memepump Scanner v2.4.1 │
│ │
│ Data Layer → Pre-filter → Signal Layer → Safety Layer → Exec → Monitor │
│ │
│ Trenches classify detect deep_safety swap monitor │
│ memepump _token() _signal() _check() buy _loop() │
│ (MIN_MC (B/S,Vol/MC (A/B/C (dev rug=0, (cost- (TP BE │
│ $80K) Top10) momentum) farm<20) aware) offset) │
└──────────────────────────────────────────────────────────────────────────┘
Authentication
Requires two sets of credentials in .env:
OKX API (for Trenches data + swap execution):
OKX_API_KEY=...
OKX_SECRET_KEY=...
OKX_PASSPHRASE=...
Solana Wallet (for on-chain signing):
SOLANA_PRIVATE_KEY=...
Quickstart
plugin-store scanner config
plugin-store scanner tick
plugin-store scanner start
plugin-store scanner stop
plugin-store scanner status
plugin-store scanner report
plugin-store scanner analyze
Configuration is managed via plugin-store scanner config and plugin-store scanner set <key> <value>. Changes take effect on the next scan cycle.
Command Index
| # |
Command |
Auth |
Description |
| 1 |
plugin-store scanner tick |
Yes |
Execute one scan cycle |
| 2 |
plugin-store scanner start |
Yes |
Start foreground daemon (tick every 10s) |
| 3 |
plugin-store scanner stop |
No |
Stop running daemon via PID file |
| 4 |
plugin-store scanner status |
No |
Show positions, session stats, PnL |
| 5 |
plugin-store scanner report |
No |
Detailed PnL report |
| 6 |
plugin-store scanner history |
No |
Trade history |
| 7 |
plugin-store scanner reset --force |
No |
Clear all state |
| 8 |
plugin-store scanner analyze |
Yes |
Dry-run full pipeline, output filter/signal results |
| 9 |
plugin-store scanner config |
No |
Show all parameters |
| 10 |
plugin-store scanner set <key> <value> |
No |
Set a config parameter |
Core Strategy
What It Does
- Every 10 seconds, fetches MIGRATED pump.fun tokens from OKX Trenches API
- Applies 22-point safety filter (3 layers: server → client → deep check)
- Detects momentum signals (TX acceleration + volume surge + buy pressure)
- Executes sized trades (SCALP 0.0375 SOL / MINIMUM 0.075 SOL)
- Monitors positions with cost-aware TP/SL + trailing stop + time stops
What It Won't Do
| Rule |
Reason |
| No MC < $80K tokens |
Low-MC rug traps (CIRCUSE/MAR1O/BILLIONAIRE) |
| No MC > $800K tokens |
Beyond meme sweet spot, limited upside |
| No un-migrated tokens |
Bonding curve stage = uncontrollable risk |
| No dev with ANY rug record |
Zero tolerance — rug history = high repeat probability |
| No dev with > 20 launches |
Token farm operators |
| No bundler ATH > 25% |
Price manipulated by bots |
| No B/S ratio < 1.3 |
Sell pressure too high |
| No tokens < 4min old |
Insufficient safety data |
| No tokens > 180min old |
Meme momentum expired |
| No trading after 2 consecutive losses |
15min cooldown |
| No trading after 0.10 SOL session loss |
Session terminated |
| No buying without signal trigger |
Must satisfy A+C or A+B+C combo |
Safety Filter System (22 Checks)
Layer 1: Server-Side Filter (API Parameters, Zero Cost)
| # |
Filter |
Threshold |
Purpose |
| 1 |
Market Cap Min |
≥ $80K |
Prevent low-MC rug |
| 2 |
Market Cap Max |
≤ $800K |
Meme sweet spot |
| 3 |
Holders |
≥ 50 |
Minimum distribution |
| 4 |
Dev Holdings |
≤ 10% |
Prevent dev dump |
| 5 |
Bundler % |
≤ 15% |
Prevent bot manipulation |
| 6 |
Sniper % |
≤ 20% |
Prevent sniper sell pressure |
| 7 |
Insider % |
≤ 15% |
Prevent insider trading |
| 8 |
Top10 Holdings |
≤ 50% |
Prevent whale control |
| 9 |
Fresh Wallets |
≤ 40% |
Prevent wash trading |
| 10 |
Total TX |
≥ 30 |
Minimum activity |
| 11 |
Buy TX |
≥ 15 |
Confirm real buy pressure |
| 12 |
Token Age |
4-180 min |
Not too new, not too old |
| 13 |
Volume |
≥ $5K |
Minimum liquidity |
| 14 |
Stage |
MIGRATED |
Only graduated tokens |
Layer 2: Client-Side Pre-Filter (classify_token())
| # |
Filter |
Threshold |
Purpose |
| 15 |
B/S Ratio |
≥ 1.3 |
buyTxCount1h / sellTxCount1h |
| 16 |
Vol/MC Ratio |
≥ 5% |
volumeUsd1h / marketCapUsd |
| 17 |
Top10 (recheck) |
≤ 55% |
Second confirmation (5% tolerance) |
Layer 3: Deep Safety Check (deep_safety_check())
| # |
Filter |
Threshold |
Source |
| 18 |
Dev Rug Count |
= 0 (ZERO tolerance) |
tokenDevInfo |
| 19 |
Dev Total Launches |
≤ 20 |
tokenDevInfo |
| 20 |
Dev Holding % |
≤ 15% |
tokenDevInfo |
| 21 |
Bundler ATH % |
≤ 25% |
tokenBundleInfo |
| 22 |
Bundler Count |
≤ 5 |
tokenBundleInfo |
Signal Detection Engine
Signal A — TX Acceleration
Current minute TX projection / previous minute ≥ threshold
OR projection ≥ 80 (absolute floor)
| Param |
Normal |
Hot Mode |
| Ratio threshold |
1.35x |
1.2x |
| Minimum current TX |
10 |
10 |
Signal B — Volume Surge
Current 1m candle volume / previous 5m average ≥ threshold
| Param |
HOT |
QUIET |
| Threshold |
2.0x |
1.5x |
Signal C — Buy Pressure Dominant
1h B/S ratio ≥ 1.5
Signal Tiers
| Tier |
Condition |
Position Size |
| SCALP |
Signal A + Signal C |
0.0375 SOL |
| MINIMUM |
Signal A + Signal B + Signal C |
0.075 SOL |
Launch Classification
| Type |
Condition |
Impact |
| HOT |
Last candle volume > $150M |
SL -20%, Time stop 8min |
| QUIET |
Everything else |
SL -25%, Time stop 15min |
Cost Model (v2.4.1)
| Param |
Value |
Description |
FIXED_COST_SOL |
0.001 |
priority_fee x2 + rent (round trip) |
COST_PER_LEG_PCT |
1.0% |
Gas + slippage + DEX fee per leg |
Breakeven formula:
breakeven_pct = FIXED_COST_SOL / sol_amount x 100 + COST_PER_LEG_PCT x 2
SCALP (0.0375 SOL): 0.001/0.0375x100 + 1.0x2 = 2.7% + 2.0% = 4.7%
MINIMUM (0.075 SOL): 0.001/0.075x100 + 1.0x2 = 1.3% + 2.0% = 3.3%
Exit System (v2.4.1 Cost-Aware)
Take Profit
| Level |
Raw % |
Actual Trigger (SCALP) |
Action |
| TP1 |
+15% |
+15% + 4.7% = +19.7% |
Sell SCALP 60% / HOT 50% / QUIET 40%, SL → breakeven |
| TP2 |
+25% |
+25% + 4.7% = +29.7% |
Sell SCALP 100% / HOT 100% / QUIET 80% |
| Trailing |
peak -5% |
After TP1 |
Sell all remaining |
Stop Loss
| Condition |
Trigger |
Action |
| Emergency |
pnl ≤ -50% |
Sell all |
| SCALP SL |
pnl ≤ -15% |
Sell all |
| HOT SL |
pnl ≤ -20% |
Sell all |
| QUIET SL |
pnl ≤ -25% |
Sell all |
| Breakeven (post-TP1) |
pnl ≤ 0% |
Sell all |
Time Stops
| Tier |
Trigger |
Condition |
| SCALP |
5 min |
TP1 not hit |
| HOT |
8 min |
TP1 not hit |
| QUIET |
15 min |
TP1 not hit AND pnl < +20% |
| Hard Max |
30 min |
Always |
Exit Decision Tree
Every 15s poll position price_info →
├── STUCK? → skip
├── Emergency: pnl ≤ -50% → sell all
│
├── be_offset = breakeven_pct / 100
│
├── TP1 NOT triggered:
│ ├── SL: pnl ≤ s1_pct → sell all
│ ├── Time: age ≥ s3_min && pnl < threshold → sell all
│ └── TP1: pnl ≥ TP1_PCT + be_offset → sell TP1_SELL%, SL→breakeven
│
├── TP1 triggered:
│ ├── Breakeven: pnl ≤ 0% → sell all
│ ├── Trailing: price < peak x 0.95 → sell all
│ ├── TP2: pnl ≥ TP2_PCT + be_offset → sell TP2_SELL%
│ └── MaxHold: age ≥ 30min → sell all
Position & Risk Management
Position Sizing
| Param |
Value |
Description |
| Max Positions |
7 |
MAX_POSITIONS |
| SCALP Size |
0.0375 SOL |
sig_a + sig_c |
| MINIMUM Size |
0.075 SOL |
sig_a + sig_b + sig_c |
| Max Total Deploy |
0.15 SOL |
MAX_SOL |
| Gas Reserve |
0.05 SOL |
Prevent insufficient balance |
| Slippage |
SCALP 8% / MINIMUM 10% |
Tiered slippage |
Session Risk Controls
| Rule |
Threshold |
Action |
| Consecutive Losses |
2 |
Pause 15 min |
| Cumulative Loss |
≥ 0.05 SOL |
Pause 30 min |
| Cumulative Loss |
≥ 0.10 SOL |
Terminate session |
STUCK Handling
Sell fails → sell_fails +1
├── < 5 fails → retry next cycle
└── ≥ 5 fails → _verify_and_retry_sell()
├── liquidity < $1K → confirmed zero, mark STUCK
├── balance = 0 → sell already succeeded (false STUCK)
├── liquidity > $1K → high-slippage retry (80%, 95%)
│ ├── success → record trade
│ └── all fail → mark STUCK
└── count as -100% PnL in session risk
OKX API Endpoints Used
Trenches (Memepump) APIs
| Endpoint |
Method |
Purpose |
/api/v6/dex/market/memepump/tokenList |
GET |
MIGRATED token list with 14 server-side filters |
/api/v6/dex/market/memepump/tokenDevInfo |
GET |
Dev rug=0, farm<20, holdings<15% |
/api/v6/dex/market/memepump/tokenBundleInfo |
GET |
Bundler ATH<25%, count<5 |
Market APIs
| Endpoint |
Method |
Purpose |
/api/v6/dex/market/candles |
GET |
1m/5m K-line for signal detection |
/api/v6/dex/market/trades |
GET |
Recent trades for momentum analysis |
/api/v6/dex/market/price-info |
POST |
Real-time price/MC/liquidity (position monitoring) |
Trade Execution APIs
| Endpoint |
Method |
Purpose |
/api/v6/dex/aggregator/quote |
GET |
Quote confirmation |
/api/v6/dex/aggregator/swap-instruction |
GET |
Get swap instruction |
/api/v6/dex/pre-transaction/broadcast-transaction |
POST |
Broadcast signed transaction |
/api/v6/dex/post-transaction/orders |
GET |
Confirm transaction completion |
Execution Pipeline
get_memepump_list("MIGRATED") ← Trenches API (minMarketCapUsd=$80K)
↓
classify_token() ← Client filter (B/S, Vol/MC, Top10)
↓
detect_signal() ← Candles + trades momentum (sig_a/sig_b/sig_c)
↓
deep_safety_check() ← Dev rug=0, farm<20, bundler ATH<25%
↓
try_open_position() ← Liquidity check + quote + swap + broadcast
↓ (record breakeven_pct)
monitor_loop() ← TP1/TP2 use pct + be_offset
Cross-Skill Workflows
Workflow A: Manual Scout Then Auto-Scan
User: "I want to see what tokens pass the scanner filter right now, then start auto-trading"
1. plugin-store memepump tokens --chain solana --stage MIGRATED → manual browse
2. plugin-store memepump token-dev-info --address <addr> → manual dev check
↓ looks good, start the bot
3. plugin-store scanner start → auto mode
4. plugin-store scanner status → monitor
Workflow B: Signal Investigation
User: "The scanner found a SCALP signal on TOKEN, should I trust it?"
1. plugin-store scanner status → check signal details
2. plugin-store memepump token-details --address <addr> → full detail
3. plugin-store memepump token-dev-info --address <addr> → dev deep dive
4. plugin-store memepump token-bundle-info --address <addr> → bundle check
5. plugin-store memepump aped-wallet --address <addr> → co-investors
6. plugin-store market kline --address <addr> --chain solana → price chart
Workflow C: Post-Trade Analysis
User: "The bot closed a trade, analyze what happened"
1. plugin-store scanner history → trade details
2. plugin-store market kline --address <addr> --chain solana → price action
3. plugin-store memepump token-details --address <addr> → current state
Configuration Parameters Reference
Trading Parameters
| Param |
Value |
Description |
loop_sec |
10 |
Scan interval (seconds) |
sol_per_trade |
SCALP=0.0375, MIN=0.075 |
Tiered position size |
max_sol |
0.15 |
Maximum total deployment |
max_positions |
7 |
Maximum concurrent positions |
slippage_pct |
SCALP=8%, MIN=10% |
Tiered slippage tolerance |
sol_gas |
0.05 |
Reserved for gas |
Exit Parameters
| Param |
Value |
tp1_pct |
+15% (+ breakeven offset) |
tp1_sell |
SCALP 60% / HOT 50% / QUIET 40% |
tp2_pct |
+25% (+ breakeven offset) |
tp2_sell |
SCALP 100% / HOT 100% / QUIET 80% |
s1_scalp |
-15% |
s1_hot |
-20% |
s1_quiet |
-25% |
he1_pct |
-50% (emergency) |
s3_scalp_min |
5 min |
s3_hot_min |
8 min |
s3_quiet_min |
15 min |
max_hold_min |
30 min |
Session Risk Parameters
| Param |
Value |
max_consec_loss |
2 |
pause_consec_sec |
900 (15 min) |
pause_loss_sol |
0.05 |
stop_loss_sol |
0.10 |
v2.4.1 Changelog
| Change |
Old |
New |
Reason |
| FIXED_COST_SOL |
0.004 |
0.001 |
Actual priority_fee x2 + rent = 0.001 |
| COST_PER_LEG_PCT |
1.5% |
1.0% |
Measured per-leg cost ~1% |
| Min Market Cap |
none |
$80,000 |
Low-MC rug prevention |
| Dev Rug Tolerance |
30% ratio |
0 (zero) |
Zero tolerance for any rug history |
| Dev Max Launches |
50 |
20 |
Tighter token farm detection |
| TP Trigger |
raw % |
% + be_offset |
Ensure net profit after costs |
Security Notes
- Private key: loaded from
.env, never stored as named variable, never in logs
- API auth: HMAC-SHA256, keys only in HTTP headers (
OK-ACCESS-KEY / OK-ACCESS-SIGN / OK-ACCESS-PASSPHRASE)
- Fail-closed: tokenList API failure → skip cycle; dev/bundler check error → mark UNSAFE
- Capital cap:
sol_used ≤ MAX_SOL (0.15), exceeding stops all buys
- Rate limit protection: built-in delay between API calls
- Memory limit: Feed 500 / Signals 500 entry cap
Known Limitations
| Issue |
Risk |
Mitigation |
| No atomic state writes |
JSON corruption on crash |
Use .tmp → rename pattern |
| No real-time balance check |
May attempt buy with insufficient SOL |
Add balance check before buy |
Common Pitfalls
| Problem |
Wrong Approach |
Correct Approach |
| TP doesn't profit |
Use raw pct for TP |
Use pct >= TP_PCT + be_offset (cost-aware) |
| Low-MC rug |
No MC floor |
Server-side minMarketCapUsd=$80K |
| Dev rug |
Reject only if ratio > 30% |
rugPullCount = 0 zero tolerance |
| High breakeven |
FIXED_COST=0.004 |
Measured 0.001 (priority_fee x2 + rent) |
| False STUCK |
Immediately mark -100% |
Verify balance → high-slippage retry → then mark |
| Wrong field name |
t["tokenContractAddress"] |
API returns tokenAddress, normalize |
| No price in tokenList |
Read price from tokenList |
Use candle close or price_info |