Index of every page on this site: llms.txt
All skills
gmgnai avatar

/gmgn-token-buy

@3a8cd51
by GMGN.AIgmgnai/gmgn-skills734 stars
148
Run it yourself

Turn a token name into a vetted, sized buy order. Two things here are exclusive to this skill: resolving a NAME or symbol to the one right contract among its copycats, and sizing an order — amount, slippage, gas, position. No sibling does either. USE THIS SKILL WHEN a buy is being prepared, which shows up as a NAME or symbol, or an AMOUNT, or both — including the plainest possible ask with no mention of checking: 我想买 200u 的 PENGU, 帮我买 500 刀的 BONK, 买 1 个 SOL 的 WIF, 帮我买点 dogwifhat, 想梭 100u 的 XX, PENGU 现在能买吗, PENGU 能不能买, 能不能冲, 值不值得进, 确认是正主不是仿盘再买, buy me $500 of PENGU — and including a bare contract address once an amount arrives with it. DO NOT USE THIS SKILL for a bare contract address with no name to resolve and no amount to size (「这个地址能不能买」, 打个分, 尽调, 有没有貔貅, rug check, is this token safe): that one belongs to gmgn-contract-dd, which is the skill that returns the 0-100 safety verdict. This skill never computes a second verdict of its own — it CALLS gmgn-contract-dd and defers to it — so there is nothing to gain by taking that ask, and the user gets an order card they never asked for. Come back here the moment they name an amount. A buy question about a LAUNCHER rather than about a token — 「这个 dev 的新盘能不能买」, 「他下一个盘值不值得冲」, "should I buy his next launch", "will this dev rug at open" — is gmgn-dev-score: it scores the creator's own record, and there is no token name to resolve or amount to size yet. Come back here once they name the coin. Naming a token with no buy intent at all is gmgn-market search. gmgn-swap is where this skill ENDS, not a rival for it: gmgn-swap signs and submits, and this skill never touches a private key and never places an order, so a plain buy request starts HERE and reaches gmgn-swap only after the user confirms the order card. Note that gmgn-swap cannot start from a name either — its --output-token is a contract address and the only names it resolves are the currencies SOL/BNB/ETH/USDC — so 帮我买点 dogwifhat has to come here regardless of who is asked. Go straight to gmgn-swap only when the user says the pre-buy check is unwanted (skip the checks, 直接买, 不用尽调, 我很急), or for what this skill does not do at all: selling, percentage sells, limit orders, stop loss, take profit, trailing orders, multi-wallet batch trading, order status, gas-price lookups. The split is by what the ask still needs done, not by who executes: a name needs resolving and an amount needs sizing, so both start here; a bare address needs only a verdict, so it is gmgn-contract-dd's; a signed transaction is always gmgn-swap's.

Use this Skill: https://skilld.dev/gh/gmgnai/gmgn-skills/gmgn-token-buy

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesthresholds.md

≈3.2k tokens on demand. Your agent reads this file only when SKILL.md points to it.

阈值表

每一道闸门的数值出处。SKILL.md 的第 2、3 步不内联任何阈值,全部到这里取。

数值为默认基线,团队可按风控口径调整。

一、交易量

项 阈值
24h 交易量 ≥ $50,000
近 1h 成交笔数 ≥ 10
独立买家 ≥ 5(旁证,缺失不拦;GMGN 无此字段时跳过)

量/池比按池子规模分档,且高比值 ≠ 刷量:

流动池规模 比值区间
< $100K 0.30 ~ 15
$100K ~ $1M 0.15 ~ 12
≥ $1M 0.05 ~ 30

比值超上限时用持有人数区分:≥150 人 = 几百上千地址在抢 → 判爆拉、放行(提示高波动);持有人极少 + 比值超上限才判刷量拦截。比值低于下限(死盘)照旧拦。实测 Looprat($61.8K 池、$1.6M 成交、比值 21、1.6K 持有人)是爆拉不是刷量。

⚠️ 本节只看量的大小,看不出量的方向。 一个 24h 成交 $63M、1h 32,446 笔的币可以同时正在崩——实测 robinhood 上的 MEME 就是这样过了本闸。方向由「三、」判,但方向不否决本闸的判定,只影响下单方式(市价 / 执行降级),只有 5m 回撤 ≥10% 才是本节自己的硬停。

二、流动池

项 阈值
可交易深度(单边口径,取法见 fields.md) ≥ $30,000。biggest_pool_address ≠ pool.pool_address 时该值是下限,达标即过;未达标但 24h 成交额 ≥ 10× 该值,判为"还有别的池"→ 标注下限后放行,不判死
锁仓 / 销毁 三态判定,见下
价格冲击(按用户金额) ≤ 3%(超了不直接判死,提示减小金额或分批)

锁仓三态(判"会不会被一个人撤池",不是"有没有锁"这个动作):

  • 集中流动性(CLMM)池无 LP 代币 → 不适用,不算缺失
  • LP 分散到无单一地址可撤池(PEPE 外部最大 0.02%、SHIB 25%)→ 降级为提示
  • 单一外部地址持 ≥ 50% LP 且未锁未销毁 → 不通过
  • 池明细与 LP 持有人都拿不到 → 数据缺失

三、方向与波动(决定用什么方式下单,不否决这一单)

「一、」判的是有没有量,本节判的是这些量在往哪边走。 缺了本节,一个正在垂直下砸的盘子会因为成交额巨大而通过交易量闸——实测 robinhood 上的 MEME(10.2 小时新盘)24h 成交 $63.14M、1h 32,446 笔,全部过闸,而它 5 分钟内已经从 $0.1107 跌到 $0.0924。

但本节的产出是执行方式,不是生死。 量、深度、安全三闸回答的是"买进去还能不能卖出来",是几小时内不会翻转的结构性事实;本节回答的是"这一秒挂市价单会成交在什么价位",分钟级就会变。把两类量放进同一个"任一项不过就不下单"的列表,会让同一个币在同一天内给出相反结论——实测 BSC 的 VC(0x36f01746a86639d0c3b6a850d328be1b634a4444)安全 91.4「可买」、单边深度 $91,442、LP 95% 已销毁、24h 成交 $6.6M,却因为 5m −8.2% 加三窗口净流向全负被判"不建议买入"。所以本节只有两种出口:不通过(不可执行) 只留一条,其余不利行情一律走 执行降级。

项 读什么 判定
短窗口回撤 price.price vs price.price_5m 跌 ≥ 10% → 不通过(本节唯一硬停);跌 5%~10% → 执行降级
净流向(逐窗口) price.buy_volume_W vs price.sell_volume_W,W ∈ {5m, 1h, 24h} 三个窗口全部卖 > 买 → 执行降级;三窗口全负且 5m 回撤 ≥ 5% → 执行降级(强制,且必须给出限价触发价)
暴涨后接卖压 price.price / price.price_24h 与 24h 净流向 24h 涨 ≥ 100 倍且 24h 净流向为负 → 警告项,且不上调滑点,改提示减小金额或不买

回撤 ≥ 10% 判不通过的理由不是"看跌",是"这单会成交在下落的刀口上":市价单在 5 分钟跌 10% 以上的行情里,一个 2% 级别的滑点几乎必然失败或成交在远低于报价的位置。这不是择时判断,是可执行性判断。跌不到 10% 时同一个理由只够改执行方式,不够否决这一单。

净流向要逐窗口读,不要只读 24h。 24h 是累计量,早期的买盘会把后来的卖压平掉;5m / 1h / 24h 三个窗口同时为负才说明卖压是持续的而不是一根噪声。实测 MEME 四个窗口全负(1m −$43.9K / 5m −$417.7K / 1h −$964.6K / 24h −$1.29M)。

本节不产生否决计数。 方向侧的每一条都只驱动执行降级与滑点公式(「五、」的波动项),不参与「四、」那条「≥2 项判不通过」——那条只计安全节自己的十项。方向数据整体拿不到时按最严一档降级处理(不许市价单),不判不通过:拿不到方向数据不等于行情平静。

执行降级的三个动作,每个都要能从字段机械推导,不许凭感觉给数:

动作 怎么算 交给谁执行
改限价单 触发价 = 当前价 × (1 − 5m 回撤幅度的绝对值),即按已观测到的回撤再让一档;两个数都读 price.price 与 price.price_5m。卡里要写明这是推导值及其出处,用户可以自己改 gmgn-swap:order strategy create --order-type limit_order --sub-order-type buy_low --check-price <触发价>
等待 写清等什么条件收敛:5m 回撤回到 5% 以内,或 5m 净流向(buy_volume_5m − sell_volume_5m)转正。不写"等一会儿"这种无判据的话 用户自己决定何时重跑本技能
减小金额 沿用「二、」价格冲击那条的口径,不新增阈值 改 Step 3 的订单金额,仍走市价单

三个动作里至少要给出一个,且降级本身要用户单独点头(见 SKILL.md Step 3 与 Display Templates 第 8 节)——把降级混在整单确认里一起过,等于没有告知。

四、安全审查(任一红旗即不通过)

**本节是兜底判据,优先级低于 gmgn-contract-dd。**有 gmgn-contract-dd 时用它的 0–100 分与红旗项,不要跑本节;只在它缺席或失败时按本节自行判定,并在确认卡注明是兜底结果。 蜜罐为真、可增发、可冻结/黑名单、买或卖税 > 10%、税率可改且权限未放弃、可升级代理且权限未放弃、该链不在 9 支持链(无安检源)。

警告项(单项写进确认卡,≥2 项判不通过;只计本节自己的十项,「三、」方向与波动不并入):

警告项 读什么 触发
Top10 集中度 top_10_holder_rate > 50%
开发者持仓 stat.creator_hold_rate(不是 dev.top_10_holder_rate) > 5%
未开源 is_open_source(仅 EVM) false
创建 < 24h creation_timestamp 存续 < 24 小时
老鼠仓 stat.top_rat_trader_percentage > 15%
持有人过少 holder_count < 200
诱捕交易者 stat.top_entrapment_trader_percentage > 30%
机器人交易 stat.top_bot_degen_percentage > 60%
捆绑钱包 wallet_tags_stat.bundler_wallets / holder_count > 5%
新钱包 stat.fresh_wallet_rate > 30%

后四项是补的——原清单只有老鼠仓一项代表交易者画像,实测漏得很彻底:robinhood 上的 MEME 诱捕交易者 55.57%、机器人 76.78%、捆绑钱包 971/11,423 = 8.5%,三项一个都没进计数,结果它只命中 1 项警告(创建 < 24h)而通过了安全闸。补上之后它命中 4 项,正确判不通过。

⚠️ 诱捕、机器人、捆绑这三项的阈值只有单次实测支撑(同一个币),没有跨币基线,所以定成警告项而不是红旗——单项不足以否决,两项一起才拦。有了更多实测再收紧。

市值 ≥ $1M 且持有人 < 100 → 直接判不通过(空壳:几十个地址撑百万市值)。

区分"函数存在"与"能被调用":owner 已放弃 + 不可收回 + 无隐藏 owner 时,字节码里的增发/冻结函数是死代码 → 降级为提示,不算红旗。

五、滑点推导(不用固定值)

滑点 = 2% + 买卖税率 + 价格冲击 × 1.5 + |5 分钟涨跌幅| × 0.5      上限 15%

< 1% 取 1%;> 15% 不抬滑点,改提示减小金额/分批;上线 1h 内 +3%。防夹默认开。

波动项取绝对值,两个方向都要加:|price.price / price.price_5m − 1|。原公式只吃池深和税率,等于假设下单那一刻价格是静止的——实测 robinhood 上的 MEME 池深 $1.69M、税 0,公式给出 2.0%,而它 5 分钟内动了 16.5%,2% 的市价单必然失败。补上波动项后同一个币算出 10.3%。

波动项只放宽滑点,不放宽任何闸门。 5 分钟跌 ≥10% 已经在「三、」判不通过,走不到这里;能走到这里的是快速上行的行情、或者跌幅在 10% 以内已被判执行降级的行情,两者都需要滑点余量。

六、候选排序(四元几何平均,不设市值硬门槛)

credible_liq    = 可交易深度
credible_vol    = 24h 成交额
credible_cap    = min(市值/FDV, max(credible_liq, credible_vol) × 50)   ← 掐住"市值靠拉盘伪造"
credible_holder = min(持有人数, 50000)
分数 = (credible_liq × credible_vol × credible_cap × 持有人因子) ^ (1/命中项数)

同名候选再乘"存续时长"先验(只进排序、绝不进闸,上限 4.1 倍,有社交只加分)。命中方式分档:地址(4.0) > 符号(3.0) > 名称(2.0) > 去分隔符一致(1.5/1.2) > 模糊(0),同档内才比分。

七、gas 三档

三档 P1/P2/P3 直接取 gas-price 的 low/average/high,不自己分级、不乘系数,默认 P2。美元折算用同一响应里的 native_token_usd_price,预计耗时用 *_estimate_time(秒)。

  • 档位字段 low/average/high 本身就是权威全额价,不要用 suggest_base_fee + *_prio_fee 去拼。 实测这两者对不上:eth/base 上档位比 base+prio 高 3.7%–20%(内含缓冲),BSC 上 *_prio_fee 合法地就是 0 而 high 是 suggest_base_fee 的 4.7 倍(561M vs 120M wei)——按 base+prio 拼会把 BSC 的快档少算 79%。suggest_base_fee 和 *_prio_fee* 只用来解释构成,不用来算钱。

  • 要读优先费分量时只读 *_prio_fee_mixed,永远不要读 *_prio_fee。 实测 sol 的 *_prio_fee 三档恒为 1(无意义占位,照它算优先费会算成 1 SOL),而 *_prio_fee_mixed 才是真实的 0.001/0.005/0.01 SOL;EVM 三条链上两个字段实测完全相等,所以统一用 _mixed 不需要分链判断。

  • EVM:档位是 wei 计价的单价(eth 实测 high = 1,084,084,466 wei ≈ 1.08 gwei),成本 = 档位 × gas 用量 ÷ 1e18 × native_token_usd_price。

  • EVM 的 gas 用量不在任何 GMGN 响应里,按主池的 DEX 类型取默认值(pool.exchange):

    pool.exchange gas 用量
    *_v2(uniswap_v2 / pancake_v2 …) 150,000
    *_v3 180,000
    *_v4 200,000
    取不到或不认识 200,000(取保守上限)

    这四个数是常见 DEX router 的典型 gas 用量,不来自任何字段,所以它是订单卡里唯一一个估算值,必须在 Gas 那一节写明「gas 用量按 N 估算」。缺了这条规定,模型要么自己编一个不标注的数,要么因为「不编数字」而整节不敢写——两种都比一个标注清楚的默认值差。Solana 不乘 gas 用量,不需要这个值。

  • Solana:档位本身就是每笔交易的 SOL 数额,不乘 gas 用量。GMGN 界面默认档是 auto(实测 0.00025 SOL),而 low/average/high(0.001/0.005/0.01 SOL)是更激进的手动档——报常规费用时用 auto,用户要求抢跑再上三档。

  • Solana 防夹的 Jito 贿赂直接取 auto_mev(实测 0.001 SOL),常规优先费可取 auto(0.0002 SOL);贿赂在成本里单列一行,不要混进优先费。

  • 数据可信度:三档差 > 50 倍(正常 2–10 倍)或档位是别链模板(Tron 返回 Solana 的 0.001/0.005/0.01)→ 标"仅供参考、建议手填"。

  • 无 gas slug 的链 → 报"需手填",不拿别链数值充数。

  • 默认档是 P2(average)。接口给的"自动建议"值可作为第四个选项(通常比 P1 更省),默认仍是 P2。

  • 用户可以自定义预设,按链分别保存。低于 P1 提示"可能长时间不成交",高于 P3 的 5 倍提示"远超极速档,多付的部分不会更快"。自定义值只提示、不替用户修正。

  • gas 成本必须折成美元写进订单卡——便宜的链上可以忽略,贵的链上小额买入时 gas 可能吃掉本金的可观比例,用户有权在确认前看到这个数。

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts25d3 checks · Risk SAFE
  • Gen Agent Trust Hub25d

    The skill provides a structured and security-conscious workflow for analyzing and preparing cryptocurrency buy orders using the gmgn-cli tool. It incorporates multiple validation gates, including volume, liquidity, and safety score checks, and treats all external metadata as untrusted data. No malicious patterns were detected.

  • Socket25d

    No alerts

  • Snyk25d

    Risk: LOW · No issues

Signed by skilld at 3a8cd51. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 weeks ago.

Activeupdated 4 weeks ago
metadata
{
  "cliHelp": "gmgn-cli market search --help"
}
Other metadata
argument-hint
<token name | symbol | contract address> [amount, e.g. 200u | 0.5 ETH | 1 sol] [--chain <sol|bsc|base|eth|arbitrum|hyperevm|robinhood|arc|stable|avalanche>]

README badge

README badge for gmgnai/gmgn-skills/gmgn-token-buy