meme-trench-scanner

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Meme Trench Scanner v1.0

Meme Trench Scanner v1.0

This strategy is a real trading bot. Make sure you understand the risks before use. It is recommended to test in Paper Mode first.

本策略是一款真实交易机器人。使用前请务必了解相关风险,建议先在模拟交易模式(Paper Mode)中测试。

Disclaimer

免责声明

This strategy script, parameter configuration, and all related documentation are for educational research and technical reference only, and do not constitute any form of investment advice, trading guidance, or financial recommendation.
  1. Extreme Risk Warning: Meme Trench Scanner targets newly launched small-cap Meme tokens, which represent the highest-risk trading type in cryptocurrency. Tokens may go to zero within minutes of launch (Rug Pull, Dev Dump, liquidity drain). You may lose your entire invested capital.
  2. Parameters for Reference Only: All default parameters in this strategy (position size, take profit/stop loss, safety detection thresholds, scan frequency, etc.) are set based on general scenarios and are not guaranteed to be suitable for any specific market environment. Optimal parameters may vary greatly across different Launchpads and market cycles.
  3. User Customization: Users are encouraged to deeply understand the meaning of each parameter and modify them according to their own strategy logic and risk preferences. Every parameter in
    config.py
    is annotated with comments for easy customization.
  4. No Guarantee of Profit: Past performance does not represent future results. Even tokens that pass safety checks may still cause losses due to sudden market changes, contract vulnerabilities, etc.
  5. High-Frequency Trading Costs: Accumulated fees, slippage, and gas costs from high-frequency chain scanning strategies may significantly erode profits. Please fully evaluate trading costs.
  6. Technical Risks: On-chain transactions are irreversible. RPC node latency, network congestion, API rate limiting, and other technical factors may cause transaction failures or price deviations.
  7. Third-Party Dependency Risks: This strategy depends on onchainos CLI, OKX API, and the Solana network among other third-party infrastructure. Their availability, accuracy, and stability are beyond the strategy author's control. Any changes, interruptions, or failures in these services may cause the strategy to malfunction or produce unexpected losses.
  8. Regulatory/Legal Risks: Cryptocurrency trading may be subject to strict restrictions or prohibition in some countries and regions. Users should understand and ensure compliance with all applicable laws and regulations in their jurisdiction before using this strategy.
  9. Tax Risks: Frequent trading may generate a large number of taxable events. Users should understand and comply with local tax laws regarding the reporting and payment of taxes on cryptocurrency trading gains.
  10. Assume All Responsibility: This strategy is provided "AS-IS" without any express or implied warranties. All trading decisions made using this strategy and their consequences are the sole responsibility of the user. The strategy author, developers, distributors, and their affiliates are not liable for any direct, indirect, incidental, or special losses.
Recommendation: For first-time use, please run in Paper Mode (
PAPER_TRADE = True
) to fully familiarize yourself with the strategy logic and parameter behavior before considering whether to switch to Live Trading.

本策略脚本、参数配置及所有相关文档仅用于教育研究和技术参考,不构成任何形式的投资建议、交易指导或金融推荐。
  1. 极高风险警告:Meme Trench Scanner针对新上线的小市值Meme代币,这是加密货币中风险最高的交易类型。代币可能在上线几分钟内归零(Rug Pull、Dev Dump、流动性抽离),您可能损失全部投资本金。
  2. 参数仅作参考:本策略中的所有默认参数(持仓规模、止盈/止损、安全检测阈值、扫描频率等)基于通用场景设置,不保证适用于任何特定市场环境。不同Launchpad平台和市场周期下的最优参数可能差异极大。
  3. 用户自定义调整:鼓励用户深入理解每个参数的含义,并根据自身策略逻辑和风险偏好进行修改。
    config.py
    中的每个参数都配有注释,便于自定义调整。
  4. 无盈利保证:过往业绩不代表未来结果。即使通过安全检测的代币,仍可能因市场突变、合约漏洞等原因导致亏损。
  5. 高频交易成本:高频链上扫描策略产生的累计手续费、滑点和Gas成本可能大幅侵蚀利润,请充分评估交易成本。
  6. 技术风险:链上交易不可逆。RPC节点延迟、网络拥堵、API速率限制等技术因素可能导致交易失败或价格偏差。
  7. 第三方依赖风险:本策略依赖onchainos CLI、OKX API及Solana网络等第三方基础设施。其可用性、准确性和稳定性不受策略作者控制。这些服务的任何变更、中断或故障都可能导致策略失效或产生意外损失。
  8. 监管/法律风险:加密货币交易在部分国家和地区可能受到严格限制或禁止。用户在使用本策略前应了解并确保遵守所在司法辖区的所有适用法律法规。
  9. 税务风险:频繁交易可能产生大量应税事件。用户应了解并遵守当地关于加密货币交易收益申报和缴税的税法规定。
  10. 自行承担全部责任:本策略按"原样"提供,不提供任何明示或暗示的担保。使用本策略做出的所有交易决策及其后果由用户自行承担。策略作者、开发者、分销商及其关联方不对任何直接、间接、偶然或特殊损失负责。
建议:首次使用时,请在模拟交易模式(
PAPER_TRADE = True
)中运行,充分熟悉策略逻辑和参数行为后,再考虑是否切换至实盘交易。

File Structure

文件结构

Meme 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

Meme 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

Prerequisites

前置条件

1. Install onchainos CLI (>= 2.1.0)

1. 安装onchainos CLI(版本≥2.1.0)

bash
undefined
bash
undefined

Check if already installed

Check if already installed

onchainos --version
onchainos --version

If not installed, follow the onchainos official documentation

If not installed, follow the onchainos official documentation

Ensure onchainos is in PATH or located at ~/.local/bin/onchainos

Ensure onchainos is in PATH or located at ~/.local/bin/onchainos

undefined
undefined

2. Log in to Agentic Wallet (TEE Signing)

2. 登录Agentic Wallet(TEE签名)

bash
undefined
bash
undefined

One-time login (email verification)

One-time login (email verification)

onchainos wallet login <your-email>
onchainos wallet login <your-email>

Verify login status

Verify login status

onchainos wallet status
onchainos wallet status

→ loggedIn: true

→ loggedIn: true

Confirm Solana address

Confirm Solana address

onchainos wallet addresses --chain 501

> Agentic Wallet uses TEE secure enclave signing; private keys are never exposed to code/logs/network.
> No need to set WALLET_PRIVATE_KEY environment variable.
onchainos wallet addresses --chain 501

> Agentic Wallet采用TEE安全飞地签名;私钥绝不会暴露给代码/日志/网络。
> 无需设置WALLET_PRIVATE_KEY环境变量。

3. No pip install needed

3. 无需pip安装依赖

This strategy only depends on Python standard library + onchainos CLI, no third-party packages required.

本策略仅依赖Python标准库 + onchainos CLI,无需安装第三方包。

AI Agent Startup Interaction Protocol

AI Agent启动交互协议

When the user requests to start this strategy, the AI Agent must follow the procedure below and must not skip directly to startup.
当用户请求启动本策略时,AI Agent必须遵循以下流程,不得直接跳过启动前步骤。

Phase 1: Display Strategy Overview

阶段1:展示策略概述

Show the user the following content:
🔍 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.
向用户展示以下内容:
🔍 Meme Trench Scanner v1.0 — Solana Meme自动化交易机器人

本策略通过交易加速+成交量激增+买卖比三重信号检测,扫描11个Solana Launchpad平台
(pump.fun、Believe、LetsBonk等)上新上线的代币,并自动执行买入、止盈/止损操作。

🧪 当前状态:模拟交易模式 — 不使用真实资金,仅观察信号

⚠️ 风险提示:Meme代币风险极高,您可能损失全部投资本金。

默认参数(仅作参考,建议根据自身情况调整):
  持仓规模:   最小0.15 SOL / 激进0.25 SOL
  最大暴露额度:1.00 SOL
  最大持仓数: 7
  止盈设置:   TP1 +15% / TP2 +25%
  止损设置:   -15% ~ -20%(根据市场热度自动调整)
  追踪止损:   触发TP1后回撤5% → 平仓
  最长持仓时间:30分钟

所有参数可在config.py中自由修改,以适配您的交易风格。

Q1: Risk Preference (Required)

Q1:风险偏好(必填)

  • 🛡️ Conservative: Quick in-and-out, small take profit, strict stop loss
  • ⚖️ Default: Balanced configuration (recommended)
  • 🔥 Aggressive: Large take profit, wide stop loss
→ Parameter mapping (for AI Agent to write to config.py, no need to show to user):
PreferenceTP1_PCTTP2_PCTS1_PCT (SCALP/hot/quiet)MAX_HOLD_MINMAX_POSITIONSTRAILING_DROP
Conservative0.100.18-0.12 / -0.15 / -0.152050.03
Default0.150.25-0.15 / -0.20 / -0.203070.05
Aggressive0.250.40-0.25 / -0.30 / -0.3045100.08
Note: S1_PCT is automatically split into three tiers by market heat (SCALP=rapid/hot=active/quiet=calm), no user selection needed.
  • 🛡️ 保守型:快进快出,小止盈,严格止损
  • ⚖️ 默认型:均衡配置(推荐)
  • 🔥 激进型:大止盈,宽止损
→ 参数映射(AI Agent写入config.py,无需展示给用户):
风险偏好TP1_PCTTP2_PCTS1_PCT(SCALP/热门/平静)MAX_HOLD_MINMAX_POSITIONSTRAILING_DROP
保守型0.100.18-0.12 / -0.15 / -0.152050.03
默认型0.150.25-0.15 / -0.20 / -0.203070.05
激进型0.250.40-0.25 / -0.30 / -0.3045100.08
注:S1_PCT会根据市场热度自动分为三个等级(SCALP=快速波动/热门=活跃/平静=低迷),无需用户选择。

Q2: Switch to Live Trading?

Q2:切换至实盘交易?

  • A. 🧪 Stay in Paper Mode, start directly (recommended default)
  • B. 💰 Switch to Live Trading mode
Choose A → Proceed directly to startup steps.
Choose B → Enter Live Trading sub-flow:
  1. ⚠️ Confirm with user: "Live Trading will use real SOL. Losses are irreversible. Confirm switch to Live Trading?"
    • User confirms → Continue
    • User declines → Fall back to Paper Mode
  2. Ask for max exposure in SOL (default 1.00 SOL)
  3. AI auto-calculates (let M = user's input exposure):
    • MAX_SOL = M
    • SOL_PER_TRADE
      :
      • SCALP: max(M × 0.25, 0.05)
        [disabled in current version]
      • MINIMUM: max(M × 0.15, 0.05)
      • STRONG: max(M × 0.25, 0.05)
    • PAUSE_LOSS_SOL = M × 0.30
      (cumulative loss pause line)
    • STOP_LOSS_SOL = M × 0.50
      (cumulative loss stop line)
  4. Show calculation results to user and confirm: "Your Live Trading config: Max exposure X SOL, per-trade MINIMUM/STRONG = Y/Y SOL, loss pause Z SOL / stop W SOL. Confirm?"
    • User confirms → Write to config.py
    • User requests adjustment → Return to step 2
  5. Set mode parameters:
    • PAPER_TRADE = False
    • PAUSED = False
  • A. 🧪 保持模拟交易模式,直接启动(推荐默认选项)
  • B. 💰 切换至实盘交易模式
选择A → 直接进入启动步骤。
选择B → 进入实盘交易子流程:
  1. ⚠️ 向用户确认: "实盘交易将使用真实SOL,损失不可逆。确认切换至实盘交易模式?"
    • 用户确认 → 继续
    • 用户拒绝 → 退回模拟交易模式
  2. 询问用户SOL最大暴露额度(默认1.00 SOL)
  3. AI自动计算(令M为用户输入的暴露额度):
    • MAX_SOL = M
    • SOL_PER_TRADE
      :
      • SCALP: 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.30
      (累计亏损暂停线)
    • STOP_LOSS_SOL = M × 0.50
      (累计亏损停止线)
  4. 向用户展示计算结果并确认: "您的实盘交易配置:最大暴露额度X SOL,单笔交易最小/激进额度=Y/Y SOL,亏损暂停Z SOL / 停止W SOL。确认?"
    • 用户确认 → 写入config.py
    • 用户要求调整 → 返回步骤2
  5. 设置模式参数:
    • PAPER_TRADE = False
    • PAUSED = False

Startup

启动步骤

  1. Modify corresponding parameters in
    config.py
    based on user responses
  2. Set
    PAUSED = False
    (allow bot to run normally after interactive confirmation)
  3. Check prerequisites:
    onchainos --version
    ,
    onchainos wallet status
  4. Start bot:
    python3 scan_live.py
  5. Show Dashboard link:
    http://localhost:3241
  6. Inform user: Currently in Paper Mode. To switch to Live Trading, modify
    PAPER_TRADE = False
    in
    config.py
If the user says "use default config" or "just run it", only set
PAUSED = False
, leave everything else unchanged, and start directly in Paper Mode.
  1. 根据用户回复修改
    config.py
    中的对应参数
  2. 设置
    PAUSED = False
    (交互确认后允许机器人正常运行)
  3. 检查前置条件:
    onchainos --version
    onchainos wallet status
  4. 启动机器人:
    python3 scan_live.py
  5. 展示仪表盘链接:
    http://localhost:3241
  6. 告知用户:当前处于模拟交易模式。如需切换至实盘交易,修改
    config.py
    中的
    PAPER_TRADE = False
如果用户说"使用默认配置"或"直接运行",仅设置
PAUSED = False
,其余参数保持不变,直接以模拟交易模式启动。

Special Cases

特殊情况

  • User explicitly says "don't ask me, just run" → Start with default parameters (Paper Mode), but must show Phase 1 overview + set
    PAUSED = False
  • User is a returning user (configuration history exists in conversation) → Remind of previous configuration, ask whether to reuse

  • 用户明确表示"别问了,直接运行" → 使用默认参数启动(模拟交易模式),但必须展示阶段1的概述内容 + 设置
    PAUSED = False
  • 用户为回头客(对话中存在配置历史) → 提醒之前的配置,询问是否复用

Quick Start

快速开始

⚠️ Before starting, confirm the
PAPER_TRADE
value in config.py —
True
for Paper Trading,
False
for Live Trading.
bash
cd ~/CC/Meme\ Trench\ Scanner\ -\ Meme\ 扫链
⚠️ 启动前,请确认config.py中的
PAPER_TRADE
值 —
True
为模拟交易,
False
为实盘交易。
bash
cd ~/CC/Meme\ Trench\ Scanner\ -\ Meme\ 扫链

1. Confirm onchainos is logged in

1. 确认onchainos已登录

onchainos wallet status
onchainos wallet status

2. Start bot (foreground, Ctrl+C to stop)

2. 启动机器人(前台运行,按Ctrl+C停止)

python3 scan_live.py
python3 scan_live.py

Or run in background

或后台运行

nohup python3 scan_live.py > bot.log 2>&1 &
nohup python3 scan_live.py > bot.log 2>&1 &

3. Open Dashboard

3. 打开仪表盘

4. Stop

4. 停止机器人

pkill -f scan_live.py

> **First startup defaults to PAUSED=True, will not open new positions. After confirming everything is normal, modify config.py PAUSED=False.**

---
pkill -f scan_live.py

> **首次启动默认设置为PAUSED=True,不会开新仓。确认一切正常后,修改config.py中的PAUSED=False。**

---

Parameter Adjustment

参数调整

All adjustable parameters are in
config.py
, no need to modify
scan_live.py
.
所有可调整参数均在
config.py
,无需修改
scan_live.py

Common Adjustments

常见调整项

NeedModify in
config.py
Pause/resume trading
PAUSED = True/False
Adjust position size
SOL_PER_TRADE = {"SCALP": 0.25, "MINIMUM": 0.15, "STRONG": 0.25}
Adjust max exposure
MAX_SOL = 1.00
Adjust max positions
MAX_POSITIONS = 7
Adjust take profit
TP1_PCT = 0.15
(15%),
TP2_PCT = 0.25
(25%)
Adjust stop loss
S1_PCT = {"SCALP": -0.15, "hot": -0.20, "quiet": -0.20}
Adjust scan speed
LOOP_SEC = 10
(seconds)
MC range
MC_MIN = 50_000
,
MC_CAP = 800_000
Paper Trading
PAPER_TRADE = True
Limit total trades
MAX_TRADES = 50
(0=unlimited)
Dashboard port
DASHBOARD_PORT = 3241
Restart bot for changes to take effect.
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.

需求
config.py
中修改
暂停/恢复交易
PAUSED = True/False
调整持仓规模
SOL_PER_TRADE = {"SCALP": 0.25, "MINIMUM": 0.15, "STRONG": 0.25}
调整最大暴露额度
MAX_SOL = 1.00
调整最大持仓数
MAX_POSITIONS = 7
调整止盈设置
TP1_PCT = 0.15
(15%)、
TP2_PCT = 0.25
(25%)
调整止损设置
S1_PCT = {"SCALP": -0.15, "hot": -0.20, "quiet": -0.20}
调整扫描速度
LOOP_SEC = 10
(秒)
市值范围
MC_MIN = 50_000
MC_CAP = 800_000
模拟交易
PAPER_TRADE = True
限制总交易次数
MAX_TRADES = 50
(0=无限制)
仪表盘端口
DASHBOARD_PORT = 3241
修改后重启机器人生效。
config.py中还包含更多高级参数(Launchpad协议ID、交易黑名单、回调观察列表、LP锁定详情、NEW阶段过滤器等)。详见config.py中的注释。

Strategy Architecture

策略架构

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)

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)

Signal Tiers

信号等级

TierConditionsPosition
SCALPsig_a + sig_c0.25 SOL (currently disabled)
MINIMUMsig_a + sig_c (no sig_b)0.15 SOL
STRONGsig_a + sig_b + sig_c0.25 SOL
In the current version, SCALP signals are skipped; only MINIMUM and STRONG execute trades.

等级触发条件持仓规模
SCALPsig_a + sig_c0.25 SOL(当前版本已禁用)
MINIMUMsig_a + sig_c(无sig_b)0.15 SOL
STRONGsig_a + sig_b + sig_c0.25 SOL
当前版本中SCALP信号会被跳过;仅MINIMUM和STRONG信号会执行交易。

Safety Detection

安全检测

Server-Side Filtering (memepump tokens parameters)

服务器端过滤(memepump代币参数)

CheckThreshold
MC range$50K - $800K
Holders>= 50
Bundler holdings<= 15%
Dev holdings<= 10%
Insider<= 15%
Sniper<= 20%
Top 10 holdings<= 40%
Fresh wallets<= 40%
检测项阈值
市值范围$50K - $800K
持币地址数≥ 50
Bundler持仓占比≤ 15%
开发者持仓占比≤ 10%
内幕账户持仓占比≤ 15%
狙击机器人持仓占比≤ 20%
前10大持仓占比≤ 40%
新钱包持仓占比≤ 40%

Deep Safety (deep_safety_check)

深度安全检测(deep_safety_check)

CheckThreshold
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 Ruggerdeath rate <= 60%

检测项阈值
开发者跑路次数= 0(零容忍)
开发者跑路率≤ 50%
开发者持仓占比≤ 10%
开发者历史上线代币数≤ 800
Bundler历史最高持仓占比≤ 25%
Bundler数量≤ 30
大额早期持仓钱包数≤ 10
LP锁定比例≥ 80%
惯犯跑路者代币死亡率 ≤ 60%

7-Layer Exit System

七层平仓系统

PriorityExit TypeTrigger ConditionSell Ratio
HE1Emergency exitPnL <= -50%100%
FAST_DUMPCrash detection>= 15% drop within 10s100%
S1Stop lossPnL <= -15%~-20% (by market heat)100%
S3Time stopSCALP 5min / hot 8min / quiet 15min still losing100%
TrailingTrailing stop>= 5% drawdown from peak after TP1 hit100%
TP1First take profit+15%40-50%
TP2Second take profit+25%100%
Priority is top to bottom; once triggered, executes immediately without checking subsequent layers.

优先级平仓类型触发条件卖出比例
HE1紧急平仓盈亏比 ≤ -50%100%
FAST_DUMP暴跌检测10秒内跌幅≥15%100%
S1止损平仓盈亏比 ≤ -15%~-20%(根据市场热度)100%
S3时间止损SCALP持仓5分钟/热门市场8分钟/平静市场15分钟仍亏损100%
追踪止损追踪平仓触发TP1后从峰值回撤≥5%100%
TP1首次止盈盈利+15%40-50%
TP2二次止盈盈利+25%100%
优先级从上到下;一旦触发,立即执行,不再检查后续层级。

Session Risk Control

会话风险控制

RuleValue
Consecutive loss pause2 losses → pause 15min
Cumulative loss pause>= 0.30 SOL → pause 30min
Cumulative loss stop>= 0.50 SOL → stop trading
Max hold time30min
HKT sleep04:00-08:00 no new positions
MAX_TRADESAuto-stop after 50 trades

规则数值
连续亏损暂停2次亏损 → 暂停15分钟
累计亏损暂停≥ 0.30 SOL → 暂停30分钟
累计亏损停止≥ 0.50 SOL → 停止交易
最长持仓时间30分钟
香港时间休眠04:00-08:00不新开仓
最大交易次数完成50笔交易后自动停止

Iron Rules (Must Not Be Violated)

铁则(严禁违反)

  1. NEVER delete a position based on a single balance check. Must have
    zero_balance_count >= 3
    .
  2. NEVER call
    save_positions()
    outside of
    pos_lock
    .
  3. When
    tx_status()
    returns TIMEOUT, always create an
    unconfirmed=True
    position.
  4. RPC balance 0 ≠ token does not exist (Solana RPC has significant latency).

  1. 严禁仅通过单次余额检查就删除持仓。必须满足
    zero_balance_count >= 3
  2. 严禁
    pos_lock
    外部调用
    save_positions()
  3. tx_status()
    返回TIMEOUT时,必须创建一个
    unconfirmed=True
    的持仓记录。
  4. RPC余额为0 ≠ 代币不存在(Solana RPC存在显著延迟)。

onchainos CLI Command Reference

onchainos CLI命令参考

#CommandPurpose
1
onchainos memepump tokens --chain solana --stage MIGRATED ...
Token discovery
2
onchainos memepump token-details --chain solana --address <addr>
Token details
3
onchainos memepump token-dev-info --chain solana --address <addr>
Dev safety
4
onchainos memepump token-bundle-info --chain solana --address <addr>
Bundler
5
onchainos memepump aped-wallet --chain solana --address <addr>
Aped wallets
6
onchainos memepump similar-tokens --chain solana --address <addr>
Similar tokens
7
onchainos token price-info --chain solana --address <addr>
Real-time price
8
onchainos market kline --chain solana --address <addr> --bar 1m
K-line
9
onchainos token trades --chain solana --address <addr>
Trade history
10
onchainos swap quote --chain solana --from <> --to <> --amount <>
Quote
11
onchainos swap swap --chain solana --from <> --to <> --amount <> --slippage <> --wallet <>
Build transaction
12
onchainos wallet contract-call --chain 501 --to <> --unsigned-tx <>
TEE sign + broadcast
13
onchainos wallet history --tx-hash <> --chain-index 501
Transaction confirmation
14
onchainos wallet status
Login status
15
onchainos wallet addresses --chain 501
Solana address
16
onchainos portfolio all-balances --address <> --chains solana
All balances
17
onchainos portfolio token-balances --address <> --tokens 501:<mint>
Single token balance

序号命令用途
1
onchainos memepump tokens --chain solana --stage MIGRATED ...
代币发现
2
onchainos memepump token-details --chain solana --address <addr>
代币详情
3
onchainos memepump token-dev-info --chain solana --address <addr>
开发者安全检测
4
onchainos memepump token-bundle-info --chain solana --address <addr>
Bundler信息
5
onchainos memepump aped-wallet --chain solana --address <addr>
大额早期持仓钱包
6
onchainos memepump similar-tokens --chain solana --address <addr>
相似代币
7
onchainos token price-info --chain solana --address <addr>
实时价格
8
onchainos market kline --chain solana --address <addr> --bar 1m
K线数据
9
onchainos token trades --chain solana --address <addr>
交易历史
10
onchainos swap quote --chain solana --from <> --to <> --amount <>
报价查询
11
onchainos swap swap --chain solana --from <> --to <> --amount <> --slippage <> --wallet <>
构建交易
12
onchainos wallet contract-call --chain 501 --to <> --unsigned-tx <>
TEE签名+广播
13
onchainos wallet history --tx-hash <> --chain-index 501
交易确认
14
onchainos wallet status
登录状态
15
onchainos wallet addresses --chain 501
Solana地址查询
16
onchainos portfolio all-balances --address <> --chains solana
全资产余额
17
onchainos portfolio token-balances --address <> --tokens 501:<mint>
单代币余额

Troubleshooting

故障排查

ProblemSolution
"FATAL: onchainos CLI not found"Install onchainos and ensure it is on PATH
"FATAL: Agentic Wallet not logged in"Run
onchainos wallet login <email>
"FATAL: Unable to parse Solana address"Check
onchainos wallet addresses --chain 501
Dashboard won't openCheck if port 3241 is in use:
lsof -i:3241
Bot not tradingCheck config.py
PAUSED = True
, change to
False
Transaction failed InstructionErrorswap --from must use
11111111111111111111111111111111
(native SOL)
Login expiredRe-run
onchainos wallet login <email>

问题解决方案
"FATAL: onchainos CLI not found"安装onchainos并确保其在PATH中
"FATAL: Agentic Wallet not logged in"运行
onchainos wallet login <email>
"FATAL: Unable to parse Solana address"检查
onchainos wallet addresses --chain 501
仪表盘无法打开检查端口3241是否被占用:
lsof -i:3241
机器人不执行交易检查config.py中的
PAUSED = True
,改为
False
交易失败出现InstructionErrorswap --from必须使用
11111111111111111111111111111111
(原生SOL地址)
登录过期重新运行
onchainos wallet login <email>

Glossary

术语表

TermDefinition
SCALP / hot / quietThree 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
ConfidenceSignal confidence score (0-100), calculated from Signal A/B/C combined
TOP_ZONEPrice position filter — current price's position within historical range, >85% means near ATH, skip
FAST_DUMP10-second crash detection — 15% drop within 10s triggers emergency exit
deep_safety_checkDeep safety check — Dev rug history, Bundler holdings, LP Lock, Aped wallets, etc.
Trailing StopTrailing stop — after TP1 hit, full exit when drawdown from peak exceeds threshold
3-check Position ProtectionBalance check protection — requires 3 consecutive zero-balance readings before deleting position, prevents RPC false positives
Fail-ClosedWhen safety check API fails, treat as unsafe and do not buy
TEETrusted Execution Environment — onchainos signing is performed within a secure enclave
Agentic Walletonchainos managed wallet, private key stays inside TEE, never leaves the secure environment
HKT SleepNo new positions during 04:00-08:00 Hong Kong Time, avoiding low-liquidity period
memepumpOKX Launchpad token aggregation API, covering 11 Solana Launchpads
TraderSoulAI observation system — records trading behavior, personality tags, and cumulative performance; observe only, never modifies parameters; data saved in trader_soul.json
LaunchpadToken launch platform — pump.fun, Believe, LetsBonk, etc.; new tokens debut here and establish initial liquidity
MC / MCAPMarket Cap — token total supply x current price, measures token scale
LPLiquidity Pool — token pair liquidity pool on DEX; larger LP means lower buy/sell slippage
LP LockLocking LP tokens for a period to ensure liquidity cannot be pulled by developers in the short term
Rug PullMalicious act where developers suddenly withdraw liquidity or dump all holdings, causing token price to go to zero
DevToken developer/deployer — in the Meme token context, refers to the creator of the token contract; their holdings and historical behavior are important risk indicators
BundlerBundle trader — addresses that buy large amounts through bundled transactions at token launch; may be insiders or manipulators
SniperSniper — bot addresses that automatically buy at the instant of token launch; concentrated holdings may create sell pressure
Aped WalletWallets that bought large amounts early in a token's life; too many indicates the token is being targeted by bots
HoneypotMalicious token contract where you can buy but cannot sell (or sell tax is extremely high)
SlippageDifference between expected and actual execution price; worse liquidity means higher slippage
lamportsSmallest unit of SOL, 1 SOL = 1,000,000,000 lamports
Native SOLSOL native token address
11111111111111111111111111111111
(32 ones), must use this address for swap --from
WSOLWrapped SOL (So11...112), SPL Token wrapped form of SOL, cannot be used for swap --from
术语定义
SCALP / hot / quiet三种市场热度等级——SCALP=快速波动、hot=活跃、quiet=平静;自动检测,会影响止损和持仓规模
Signal A (TX Acceleration)交易频率激增检测——当当前每分钟交易数超过基准值×阈值时触发
Signal B (Volume Surge)5分钟/15分钟成交量突破检测
Signal C (B/S Ratio)买卖比确认——买入次数/卖出次数 > 阈值
Confidence信号置信度评分(0-100),由Signal A/B/C组合计算得出
TOP_ZONE价格位置过滤——当前价格在历史区间中的位置,>85%意味着接近历史最高价,将跳过该代币
FAST_DUMP10秒暴跌检测——10秒内跌幅达15%时触发紧急平仓
deep_safety_check深度安全检测——包括开发者跑路历史、Bundler持仓、LP锁定、大额早期持仓钱包等
Trailing Stop追踪止损——触发TP1后,从峰值回撤超过阈值时全额平仓
3-check Position Protection三重校验持仓保护——需要连续3次读取到零余额才删除持仓,防止RPC误报
Fail-Closed当安全检测API失败时,视为代币不安全,不执行买入
TEE可信执行环境(Trusted Execution Environment)——onchainos签名在安全飞地内执行
Agentic Walletonchainos托管钱包,私钥存储在TEE内,绝不会离开安全环境
HKT Sleep香港时间04:00-08:00不新开仓,避开低流动性时段
memepumpOKX Launchpad代币聚合API,覆盖11个Solana Launchpad平台
TraderSoulAI观察系统——记录交易行为、个性标签和累计业绩;仅作观察,绝不修改参数;数据存储在trader_soul.json中
Launchpad代币上线平台——如pump.fun、Believe、LetsBonk等;新代币在此首发并建立初始流动性
MC / MCAP市值(Market Cap)——代币总供应量×当前价格,衡量代币规模
LP流动性池(Liquidity Pool)——DEX上的代币对流动性池;LP越大,买卖滑点越低
LP Lock锁定LP代币一段时间,确保短期内开发者无法抽离流动性
Rug Pull恶意行为——开发者突然抽离流动性或抛售全部持仓,导致代币价格归零
Dev代币开发者/部署者——在Meme代币语境下,指代币合约的创建者;其持仓和历史行为是重要风险指标
Bundler批量交易者——在代币上线时通过批量交易大量买入的地址;可能是内幕人员或操纵者
Sniper狙击机器人——在代币上线瞬间自动买入的机器人地址;集中持仓可能带来抛售压力
Aped Wallet大额早期持仓钱包——在代币生命周期早期大量买入的钱包;数量过多意味着代币被机器人盯上
Honeypot恶意代币合约——只能买入无法卖出(或卖出税极高)
Slippage预期执行价格与实际执行价格的差异;流动性越差,滑点越高
lamportsSOL的最小单位,1 SOL = 1,000,000,000 lamports
Native SOLSOL原生代币地址
11111111111111111111111111111111
(32个1),swap --from必须使用该地址
WSOL封装SOL(So11...112),SOL的SPL代币封装形式,不能用于swap --from