The desks
Token preflight.
A trading agent asks "may I buy $1,000 of this token through this pool?" and gets HOLD, REVIEW or REJECT in a signed memo. This is Telegraph Mission 14 (Web3 Native and DeFi). The buy itself is simulated: Shield never trades.
How to use it
Open /preflight?desk=trade, pick a fixture under Try one or type your own, and press Run preflight. Agents call POST /api/preflight with the same fields.
| Field | What it is | Notes |
|---|---|---|
mode | "trade" | required |
chain | ethereum, base, arbitrum, optimism, polygon, bsc or avalanche | the chain list in the page; the server accepts any chain in src/config/chains.ts |
token | the token contract, 0x plus 40 hex characters | required |
pool | the DEX pool the trade goes through | required for a trade |
tradeUsd | the simulated trade size in USD | compared with the pool's depth |
What it buys
After reading the contract itself at one block (code, name, symbol, decimals, totalSupply(), proxy slots, owner()), Shield buys four facts, $0.01 each:
| Fact | Telegraph intent | Checked against |
|---|---|---|
| Security review | SECURITY_REVIEW_GENERAL | whether the answer examined this token at all |
| Total supply | TOKEN_TOTAL_SUPPLY_VERIFY_GENERAL | Shield's totalSupply() read, 50 bps tolerance |
| Wash trading | WASH_TRADING_DETECTION_GENERAL | whether trades were examined and the figure measured |
| Pool depth | LIQUIDITY_DEPTH_VERIFY_GENERAL | the trade size |
SECURITY_REVIEW_GENERAL stands in for SMART_CONTRACT_AUDIT_GENERAL, which the node has not opened. Truvian's adapter 187 is already that intent's champion evaluator.
The rules
| Finding | Severity | When |
|---|---|---|
chain.not_a_contract | block | the address has no contract code |
security.honeypot, security.insecure | block | the review says the token cannot be sold, or is insecure |
wash.block | block | wash trading at or above 50% of volume |
security.not_examined, security.not_about_token, security.no_verdict | review | the review examined nothing, was about another token, or gave no verdict |
supply.conflict | review | Telegraph's supply is more than 50 bps from the chain read |
wash.review, wash.not_examined, wash.not_measured | review | 20% to 50% wash, or a figure from an answer that saw no trades |
liquidity.thin, liquidity.price_impact | review | pool under $100,000, or the trade above 1% of it |
security.holder_concentration | review | top 10 holders over 50%, unless the pool holds at least $1,000,000 |
| buy or sell tax | review / block | at or above 10% / 50% |
| a missing answer | review | any fact without an answer: nothing is cleared on a missing check |
Any block gives reject; otherwise any review gives review; only a clean set gives hold. The thresholds are written into every memo (POLICY in src/shield/preflight.ts).
How it is built
runPreflight in src/shield/preflight.ts plans the asks, buy buys each fact once (with reuse and a second opinion, withSecondOpinion), and evaluate turns reads and answers into findings and the decision. Chain reads are readTokenFacts in src/shield/tokenFacts.ts. The signed memo comes from signMemo in src/shield/memo.ts. npm run test:preflight replays stored answers through the rules.
Real memos
- FKLfi2qT, 20 Nov - SQUID, the 2021 rug pull on BSC, rated Secure by a miner that never saw its code; the chain read caught a total supply 514 bps off. REVIEW, $0.04.
- B4k2AxbY, 21 Nov - WETH, four answers each with its miner, signal and escrow receipt. REVIEW, $0.04.
- 63zSY25V, 20 Nov - WETH, every check answered and clean. HOLD, $0.04.
- HnCGMGFK, 20 Nov - vitalik.eth's address given as a token: not a contract. REJECT, nothing bought.
SECURITY_REVIEW_GENERAL asks have mostly ended in a gateway timeout, so most preflights end in REVIEW: a missing security review cannot clear a token. Shield does not retry a timeout (it would pay twice), and the decision says why.