feast-audit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFeast script audit
Feast 脚本审计
A strategy script runs with the user's money, so it passes two stages first. Both are bound to the file's sha256: any edit is a new file and needs a new audit.
FLbash
node "${FEAST_LEAGUE_RUNTIME:-$HOME/.feast-league/runtime}/src/league/bin.mjs"策略脚本会使用用户的资金运行,因此必须先通过两个阶段的检查。两个阶段均与文件的 sha256 绑定:任何编辑都会产生一个新文件,并需要重新审计。
FLbash
node "${FEAST_LEAGUE_RUNTIME:-$HOME/.feast-league/runtime}/src/league/bin.mjs"Stage 1: the static rules (deterministic)
阶段 1:静态规则(确定性)
bash
FL audit <file.mjs>The runtime parses the file; it never runs it.
| Rule | Refuses |
|---|---|
| A1 | any direct wallet or process access: |
| A2 | imports of any kind: |
| A3 | network: |
| A4 | secrets: key-shaped hex, seed-phrase-shaped words, API keys, key files |
| A5 | dynamic code and reaching for globals: |
| A6 | unbounded loops ( |
| A7 | the wrong shape: other exports, a tick outside 15–3600 s, code at the top level, over 64 KB |
| A8 | any |
| A9 | (a warning) literal sizes over the per-trade limit |
If it refuses:
- Show every hit with its rule and line.
- Stop.
- If you wrote the script, offer to fix it and audit again. Do not argue a rule away.
bash
FL audit <file.mjs>runtime 会解析文件;绝不会运行文件。
| 规则 | 拒绝的情况 |
|---|---|
| A1 | 任何直接的钱包或进程访问: |
| A2 | 任何类型的导入: |
| A3 | 网络访问: |
| A4 | 密钥:密钥形态的十六进制值、seed-phrase 形态的单词、API keys、key files |
| A5 | 动态代码和访问 globals: |
| A6 | 无界循环( |
| A7 | 结构错误:存在其他 exports、tick 超出 15–3600 s 范围、存在顶层代码、体积超过 64 KB |
| A8 | 使用除 |
| A9 | (警告)直接写入的数值超过单笔交易上限 |
如果检查拒绝:
- 显示每一条命中项及其规则和行号。
- 停止。
- 如果脚本是你编写的,提出修复并重新审计的方案。不要试图辩称某条规则不适用。
Stage 2: your model read
阶段 2:模型审查
Before you start:
- Read the whole file yourself, against references/checklist.md.
- Answer every question in writing, in a few lines each.
- Be the user's advocate. You are looking for a script that would surprise them with their own money.
- Code you wrote yourself gets no exemption.
Record the verdict:
bash
FL audit <file.mjs> --model-verdict pass --notes "M1: … M2: … M3: … M4: … M5: … M6: … M7: … M8: …"
FL audit <file.mjs> --model-verdict refuse --notes "M2: buys on every tick with no condition …"Refuse when any answer is a real concern:
- it trades more than the user asked
- it has no exit
- it is obfuscated
- it does something the user did not ask for
Then tell the user in two sentences what the script does, and whether it passed.
开始之前:
- 自行完整阅读整个文件,并对照 references/checklist.md。
- 以书面形式回答每一个问题,每个问题用几行说明。
- 站在用户一边。你要查找的是这样一个脚本:它可能使用用户自己的钱做出令用户意外的行为。
- 即使代码是你自己编写的,也不豁免。
记录裁决:
bash
FL audit <file.mjs> --model-verdict pass --notes "M1: … M2: … M3: … M4: … M5: … M6: … M7: … M8: …"
FL audit <file.mjs> --model-verdict refuse --notes "M2: 每个 tick 都会买入,且没有任何条件 ……"只要任一答案构成实质性隐患,就应拒绝:
- 交易量超过用户要求的程度
- 没有退出机制
- 经过混淆处理
- 执行了用户未要求的操作
**然后用两句话告诉用户:**脚本会做什么,以及它是否通过。
Then
接下来
A script with both stages passed can be planned and started (see the feast-league skill). It runs in the warm-up tier:
- its first 5 trades are at 0.001 BNB
- two failures in a row, or any hard-limit hit, stop it and notify the user
The runtime refuses to start a script whose current bytes lack either pass.
通过两个阶段的脚本可以进行规划并启动(参见 feast-league skill)。它会在**预热层(warm-up tier)**中运行:
- 前 5 笔交易使用 0.001 BNB
- 连续两次失败,或触发任何 hard limit,都会停止脚本并通知用户
如果脚本当前字节未绑定两个阶段的通过结果,runtime 会拒绝启动该脚本。