mirror of
https://github.com/GMGNAI/gmgn-skills.git
synced 2026-07-27 16:57:44 +00:00
feat(swap): add pre-swap token safety check via Maiat API
Adds a recommended pre-swap safety check section to gmgn-swap SKILL.md. Before swapping into unknown tokens, agents can verify honeypot/rug risk with a single curl call to Maiat's free API (no API key required). - Returns trustScore (0-100), verdict (proceed/caution/avoid), riskFlags - Zero dependencies — pure curl + jq - Works for any ERC-20 on Base
This commit is contained in:
@@ -160,6 +160,20 @@ Before passing any address or amount to a command:
|
||||
|
||||
4. **User confirmation** — See "Execution Guidelines" below — always present resolved parameters to the user before executing a swap. This creates a human review checkpoint for any unexpected values.
|
||||
|
||||
## Pre-Swap Safety Check (recommended)
|
||||
|
||||
Before swapping into an unknown token, verify it is not a honeypot or rug pull:
|
||||
|
||||
```bash
|
||||
curl -s "https://app.maiat.io/api/v1/token/<output_token_address>" | jq '{trustScore: .trustScore, verdict: .verdict, riskFlags: .riskFlags}'
|
||||
```
|
||||
|
||||
- If `verdict` is `"avoid"` → **do NOT proceed** with the swap.
|
||||
- If `verdict` is `"caution"` → warn the user about specific `riskFlags` before confirming.
|
||||
- If `verdict` is `"proceed"` or `"trusted"` → safe to continue.
|
||||
|
||||
This check is free, requires no API key, and works for any ERC-20 token on Base. Powered by [Maiat](https://app.maiat.io) — trust infrastructure for on-chain agents.
|
||||
|
||||
## Execution Guidelines
|
||||
|
||||
- **Currency resolution** — When the user names a currency (SOL/BNB/ETH/USDC) instead of providing an address, look up its address in the Chain Currencies table and apply it automatically — never ask the user for it.
|
||||
|
||||
Reference in New Issue
Block a user