Loading...
Loading...
Meme Trench Scanner v1.0 — Agentic Wallet TEE signing automated trading bot. onchainos CLI driven (no API Key needed), full coverage of 11 Solana Launchpads, 5m/15m B/S precision signal detection, price position filter (TOP_ZONE 85%), TP2 100% exit (no moon bag), TraderSoul AI observation system, FAST_DUMP 10-second crash detection, 3-check position protection. Triggers when the user mentions meme trench scanner, meme scanner, chain scanner, memepump scan, Tranches scan, pump.fun chain scan, safety filter chain scan, dev rug detection, bundler filter, on-chain scanning strategy, 扫链, Meme 扫链, or wants to automatically scan and trade pump.fun migrated tokens based on memepump.
npx skill4agent add okx/plugin-store meme-trench-scannerThis strategy is a real trading bot. Make sure you understand the risks before use. It is recommended to test in Paper Mode first.
config.pyPAPER_TRADE = TrueMeme Trench Scanner - Meme 扫链/
├── skill.md ← This file (strategy documentation)
├── config.py ← All adjustable parameters (modify parameters here only)
├── scan_live.py ← Strategy main program
├── dashboard.html ← Web Dashboard UI
├── scan_positions.json ← [Auto-generated] Position data
├── scan_trades.json ← [Auto-generated] Trade history
├── trader_soul.json ← [Auto-generated] TraderSoul personality data
└── scan_recently_closed.json ← [Auto-generated] Cooldown records# Check if already installed
onchainos --version
# If not installed, follow the onchainos official documentation
# Ensure onchainos is in PATH or located at ~/.local/bin/onchainos# One-time login (email verification)
onchainos wallet login <your-email>
# Verify login status
onchainos wallet status
# → loggedIn: true
# Confirm Solana address
onchainos wallet addresses --chain 501Agentic Wallet uses TEE secure enclave signing; private keys are never exposed to code/logs/network. No need to set WALLET_PRIVATE_KEY environment variable.
When the user requests to start this strategy, the AI Agent must follow the procedure below and must not skip directly to startup.
🔍 Meme Trench Scanner v1.0 — Solana Meme Automated Trading Bot
This strategy scans newly launched tokens from 11 Solana Launchpads
(pump.fun, Believe, LetsBonk, etc.) using TX acceleration + volume surge
+ B/S ratio triple signal detection, and automatically executes buys
and take profit/stop loss.
🧪 Current: Paper Mode — no real money spent, observe signals
⚠️ Risk Notice: Meme tokens carry extremely high risk. You may lose your entire invested capital.
Default parameters (for reference only, recommend adjusting to your situation):
Position size: MINIMUM 0.15 SOL / STRONG 0.25 SOL
Max exposure: 1.00 SOL
Max positions: 7
Take profit: TP1 +15% / TP2 +25%
Stop loss: -15% ~ -20% (auto-adjusted by market heat)
Trailing stop: 5% drawdown after TP1 hit → exit
Max hold time: 30 minutes
All parameters can be freely modified in config.py to suit your trading style.| Preference | TP1_PCT | TP2_PCT | S1_PCT (SCALP/hot/quiet) | MAX_HOLD_MIN | MAX_POSITIONS | TRAILING_DROP |
|---|---|---|---|---|---|---|
| Conservative | 0.10 | 0.18 | -0.12 / -0.15 / -0.15 | 20 | 5 | 0.03 |
| Default | 0.15 | 0.25 | -0.15 / -0.20 / -0.20 | 30 | 7 | 0.05 |
| Aggressive | 0.25 | 0.40 | -0.25 / -0.30 / -0.30 | 45 | 10 | 0.08 |
Note: S1_PCT is automatically split into three tiers by market heat (SCALP=rapid/hot=active/quiet=calm), no user selection needed.
MAX_SOL = MSOL_PER_TRADESCALP: max(M × 0.25, 0.05)MINIMUM: max(M × 0.15, 0.05)STRONG: max(M × 0.25, 0.05)PAUSE_LOSS_SOL = M × 0.30STOP_LOSS_SOL = M × 0.50PAPER_TRADE = FalsePAUSED = Falseconfig.pyPAUSED = Falseonchainos --versiononchainos wallet statuspython3 scan_live.pyhttp://localhost:3241PAPER_TRADE = Falseconfig.pyPAUSED = FalsePAUSED = False⚠️ Before starting, confirm thevalue in config.py —PAPER_TRADEfor Paper Trading,Truefor Live Trading.False
cd ~/CC/Meme\ Trench\ Scanner\ -\ Meme\ 扫链
# 1. Confirm onchainos is logged in
onchainos wallet status
# 2. Start bot (foreground, Ctrl+C to stop)
python3 scan_live.py
# Or run in background
nohup python3 scan_live.py > bot.log 2>&1 &
# 3. Open Dashboard
open http://localhost:3241
# 4. Stop
pkill -f scan_live.pyFirst startup defaults to PAUSED=True, will not open new positions. After confirming everything is normal, modify config.py PAUSED=False.
config.pyscan_live.py| Need | Modify in |
|---|---|
| Pause/resume trading | |
| Adjust position size | |
| Adjust max exposure | |
| Adjust max positions | |
| Adjust take profit | |
| Adjust stop loss | |
| Adjust scan speed | |
| MC range | |
| Paper Trading | |
| Limit total trades | |
| Dashboard port | |
config.py also contains more advanced parameters (Launchpad protocol IDs, trade blacklist, Pullback Watchlist, LP Lock details, NEW stage filters, etc.). See comments in config.py for details.
scan_live.py (single-file Bot)
├── onchainos CLI (data + execution + safety — no API Key)
├── scanner_loop() ← background thread, every 10s
│ ├── memepump_token_list() Token discovery (11 Launchpads)
│ ├── pre_filter() Basic filters (MC/Age/B&S/Vol/Holders)
│ ├── hot_mode_check() Market heat detection
│ └── detect_signal() Signal detection
│ ├── 5m/15m B/S (raw trades calculation)
│ ├── TX acceleration detection (Signal A)
│ ├── Volume surge (Signal B)
│ ├── Anti-chase protection
│ ├── TOP_ZONE 85% filter
│ ├── Confidence scoring
│ └── → try_open_position() (async thread)
│ └── deep_safety_check() (Dev+Bundle+LP+Aped)
├── monitor_loop() ← background thread, every 1s
│ ├── _quick_wallet_sync() Wallet sync
│ ├── check_position() Exit decision
│ │ ├── HE1: -50% emergency exit
│ │ ├── FAST_DUMP: -15% within 10s
│ │ ├── S1: Stop loss / Breakeven
│ │ ├── S3: Time stop
│ │ ├── Trailing: 5% drawdown after TP1
│ │ ├── TP1: +15% partial sell
│ │ └── TP2: +25% full exit
│ └── wallet_audit() Periodic reconciliation
├── TraderSoul AI personality (observe only, no param changes)
├── Dashboard (port 3241) Web UI
└── Persistent files (JSON, atomic write)| Tier | Conditions | Position |
|---|---|---|
| SCALP | sig_a + sig_c | 0.25 SOL (currently disabled) |
| MINIMUM | sig_a + sig_c (no sig_b) | 0.15 SOL |
| STRONG | sig_a + sig_b + sig_c | 0.25 SOL |
| Check | Threshold |
|---|---|
| MC range | $50K - $800K |
| Holders | >= 50 |
| Bundler holdings | <= 15% |
| Dev holdings | <= 10% |
| Insider | <= 15% |
| Sniper | <= 20% |
| Top 10 holdings | <= 40% |
| Fresh wallets | <= 40% |
| Check | Threshold |
|---|---|
| Dev rug count | = 0 (zero tolerance) |
| Dev rug rate | <= 50% |
| Dev holdings | <= 10% |
| Dev historical launches | <= 800 |
| Bundler ATH | <= 25% |
| Bundler count | <= 30 |
| Aped wallets | <= 10 |
| LP Lock | >= 80% |
| Serial Rugger | death rate <= 60% |
| Priority | Exit Type | Trigger Condition | Sell Ratio |
|---|---|---|---|
| HE1 | Emergency exit | PnL <= -50% | 100% |
| FAST_DUMP | Crash detection | >= 15% drop within 10s | 100% |
| S1 | Stop loss | PnL <= -15%~-20% (by market heat) | 100% |
| S3 | Time stop | SCALP 5min / hot 8min / quiet 15min still losing | 100% |
| Trailing | Trailing stop | >= 5% drawdown from peak after TP1 hit | 100% |
| TP1 | First take profit | +15% | 40-50% |
| TP2 | Second take profit | +25% | 100% |
Priority is top to bottom; once triggered, executes immediately without checking subsequent layers.
| Rule | Value |
|---|---|
| Consecutive loss pause | 2 losses → pause 15min |
| Cumulative loss pause | >= 0.30 SOL → pause 30min |
| Cumulative loss stop | >= 0.50 SOL → stop trading |
| Max hold time | 30min |
| HKT sleep | 04:00-08:00 no new positions |
| MAX_TRADES | Auto-stop after 50 trades |
zero_balance_count >= 3save_positions()pos_locktx_status()unconfirmed=True| # | Command | Purpose |
|---|---|---|
| 1 | | Token discovery |
| 2 | | Token details |
| 3 | | Dev safety |
| 4 | | Bundler |
| 5 | | Aped wallets |
| 6 | | Similar tokens |
| 7 | | Real-time price |
| 8 | | K-line |
| 9 | | Trade history |
| 10 | | Quote |
| 11 | | Build transaction |
| 12 | | TEE sign + broadcast |
| 13 | | Transaction confirmation |
| 14 | | Login status |
| 15 | | Solana address |
| 16 | | All balances |
| 17 | | Single token balance |
| Problem | Solution |
|---|---|
| "FATAL: onchainos CLI not found" | Install onchainos and ensure it is on PATH |
| "FATAL: Agentic Wallet not logged in" | Run |
| "FATAL: Unable to parse Solana address" | Check |
| Dashboard won't open | Check if port 3241 is in use: |
| Bot not trading | Check config.py |
| Transaction failed InstructionError | swap --from must use |
| Login expired | Re-run |
| Term | Definition |
|---|---|
| SCALP / hot / quiet | Three market heat tiers — SCALP=rapid, hot=active, quiet=calm; auto-detected, affects stop loss and position size |
| Signal A (TX Acceleration) | Transaction frequency surge detection — triggers when current txs/min exceeds baseline x threshold |
| Signal B (Volume Surge) | 5m/15m volume breakout detection |
| Signal C (B/S Ratio) | Buy/sell ratio confirmation — buy count / sell count > threshold |
| Confidence | Signal confidence score (0-100), calculated from Signal A/B/C combined |
| TOP_ZONE | Price position filter — current price's position within historical range, >85% means near ATH, skip |
| FAST_DUMP | 10-second crash detection — 15% drop within 10s triggers emergency exit |
| deep_safety_check | Deep safety check — Dev rug history, Bundler holdings, LP Lock, Aped wallets, etc. |
| Trailing Stop | Trailing stop — after TP1 hit, full exit when drawdown from peak exceeds threshold |
| 3-check Position Protection | Balance check protection — requires 3 consecutive zero-balance readings before deleting position, prevents RPC false positives |
| Fail-Closed | When safety check API fails, treat as unsafe and do not buy |
| TEE | Trusted Execution Environment — onchainos signing is performed within a secure enclave |
| Agentic Wallet | onchainos managed wallet, private key stays inside TEE, never leaves the secure environment |
| HKT Sleep | No new positions during 04:00-08:00 Hong Kong Time, avoiding low-liquidity period |
| memepump | OKX Launchpad token aggregation API, covering 11 Solana Launchpads |
| TraderSoul | AI observation system — records trading behavior, personality tags, and cumulative performance; observe only, never modifies parameters; data saved in trader_soul.json |
| Launchpad | Token launch platform — pump.fun, Believe, LetsBonk, etc.; new tokens debut here and establish initial liquidity |
| MC / MCAP | Market Cap — token total supply x current price, measures token scale |
| LP | Liquidity Pool — token pair liquidity pool on DEX; larger LP means lower buy/sell slippage |
| LP Lock | Locking LP tokens for a period to ensure liquidity cannot be pulled by developers in the short term |
| Rug Pull | Malicious act where developers suddenly withdraw liquidity or dump all holdings, causing token price to go to zero |
| Dev | Token developer/deployer — in the Meme token context, refers to the creator of the token contract; their holdings and historical behavior are important risk indicators |
| Bundler | Bundle trader — addresses that buy large amounts through bundled transactions at token launch; may be insiders or manipulators |
| Sniper | Sniper — bot addresses that automatically buy at the instant of token launch; concentrated holdings may create sell pressure |
| Aped Wallet | Wallets that bought large amounts early in a token's life; too many indicates the token is being targeted by bots |
| Honeypot | Malicious token contract where you can buy but cannot sell (or sell tax is extremely high) |
| Slippage | Difference between expected and actual execution price; worse liquidity means higher slippage |
| lamports | Smallest unit of SOL, 1 SOL = 1,000,000,000 lamports |
| Native SOL | SOL native token address |
| WSOL | Wrapped SOL (So11...112), SPL Token wrapped form of SOL, cannot be used for swap --from |