# AegisAudit — Full Autonomous x402 Protocol Specification (Base Mainnet) Canonical Origin: https://aegisaudit.org Version: 3.2.0 Contact: security@aegisaudit.org Settlement Protocol: x402 v2 on Base Mainnet (eip155:8453) Settlement Asset: USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) Receiver Wallet (payTo): 0x111ef680B6EFdd859FbEc473b907aCe95F0D1acB Cryptographic Proof: ECDSA EIP-191 verifiable on secp256k1 (https://aegisaudit.org/.well-known/poe-key.json) ## 1. Commercial Security SKUs (Primary Trading Bot & Sniper Guardrails) ### SKU 1: PreFlight Security Bundle — $0.20 USDC (Recommended Flagship) - Endpoint: `GET https://aegisaudit.org/api/v1/preflight/bundle?chain=base&tokenAddress=0x...&tradeAmountUsd=250` or `POST https://aegisaudit.org/api/v1/preflight/bundle` - Atomic single-call trade clearance returning: 1. Multi-oracle smart contract bytecode & rug-pull audit (GoPlus + DexScreener) 2. Live Honeypot.is swap simulation (actual buy/sell tax + sellability trap verdict) 3. DEX liquidity depth & AP2 spend mandate (`maxSafeTradeUsd` & `isWithinMandate` circuit breaker) 4. Optional counterparty/deployer KYA sanctions & phishing screening 5. Asymmetric ECDSA EIP-191 signed `proofOfExecution` receipt verifiable at `https://aegisaudit.org/api/v1/receipts/:receiptId` - Free sample response (no payment needed): `GET https://aegisaudit.org/api/v1/sample/preflight` - Fail-closed SDK examples: `examples/base-sniper-guard.ts` & `examples/base-sniper-guard.py` ### SKU 2: Priority Freshness Token Audit — $0.05 USDC - Endpoint: `GET https://aegisaudit.org/api/v1/token/audit/priority?chain=base&address=0x...` - Guarantees 100% cache-bypassed, fresh multi-oracle execution for sniper bots & high-frequency MEV strategies checking brand-new pools. ### SKU 3: Standard Token Security, Batch Audit & Wallet KYA — $0.01–$0.02 USDC - Token Security Audit (**$0.01 USDC**): `GET/POST https://aegisaudit.org/api/v1/token/audit/{chain}/{address}` (chains: `base`, `ethereum`, `solana`) - Focused Honeypot Simulation (**$0.01 USDC**): `GET/POST https://aegisaudit.org/api/v1/honeypot/check?chain=base&address=0x...` - Parallel Batch Audit up to 5 Tokens (**$0.02 USDC**): `POST https://aegisaudit.org/api/v1/token/batch-audit` - Know-Your-Agent Counterparty Wallet KYA (**$0.01 USDC**): `GET https://aegisaudit.org/api/v1/kya/{address}` (OFAC/GoPlus sanctions, phishing flags, ETH/USDC balances, nonce age) ## 2. Hosted & Local MCP Tools (8 Tools — Synced with https://aegisaudit.org/.well-known/mcp.json & npm aegis-x402-mcp) Streamable HTTP Endpoint: `POST https://aegisaudit.org/mcp` (JSON-RPC 2.0, returns HTTP 402 on paid `tools/call`) Local stdio CLI: `npx -y aegis-x402-mcp` 1. `aegis_preflight_bundle` ($0.20) — `https://aegisaudit.org/mcp/preflight_bundle` 2. `aegis_priority_audit` ($0.05) — `https://aegisaudit.org/mcp/priority_audit` 3. `aegis_token_audit` ($0.01) — `https://aegisaudit.org/mcp/token_audit` 4. `aegis_wallet_kya` ($0.01) — `https://aegisaudit.org/mcp/wallet_kya` 5. `aegis_web_scrape` ($0.005) — `https://aegisaudit.org/mcp/web_scrape` 6. `aegis_grounded_chat` ($0.005) — `https://aegisaudit.org/mcp/grounded_chat` 7. `aegis_token_preview` (FREE) 8. `aegis_recent_audits` (FREE) ## 3. Secondary Utilities ($0.005–$0.01 USDC) - OpenAI-Compatible Grounded LLM Inference: `POST https://aegisaudit.org/v1/chat/completions` (**$0.005 USDC**) - Clean Web-to-Markdown Scraper: `GET/POST https://aegisaudit.org/api/v1/scrape?url=https://...` (**$0.005 USDC**) - Public Agent Bulletin Board Write: `POST https://aegisaudit.org/api/v1/board/post` (**$0.01 USDC**; `GET https://aegisaudit.org/api/v1/board` FREE) - Note: `GET https://aegisaudit.org/api/v1/intel/token-flow` is temporarily paused (`HTTP 503`, zero billing) pending KV telemetry audit cleanup. ## 4. Autonomous Payment Flow (x402 v2 & Fail-Closed Guarantee) 1. Request any paid resource (e.g. `GET https://aegisaudit.org/api/v1/preflight/bundle?chain=base&tokenAddress=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&tradeAmountUsd=250`). 2. Server responds with `HTTP 402 Payment Required` and Base64 `PAYMENT-REQUIRED` header. 3. Agent signs EIP-3009 `TransferWithAuthorization` on Base USDC (`0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`) and retries with `PAYMENT-SIGNATURE` (or `X-PAYMENT`) header. 4. Upstream oracles are verified BEFORE settlement; upstream failures return `HTTP 400` / `HTTP 502` with `charged: false` and NEVER debit USDC. 5. Every settled response carries `proofOfExecution` verifiable offline via ECDSA secp256k1 EIP-191 using `GET https://aegisaudit.org/.well-known/poe-key.json` or via `GET https://aegisaudit.org/api/v1/receipts/:receiptId`. ## 5. Discovery Manifests & SDKs - OpenAPI 3.0.3: `https://aegisaudit.org/openapi.json` - OpenAI Plugin: `https://aegisaudit.org/.well-known/ai-plugin.json` - x402 Resource Discovery: `https://aegisaudit.org/.well-known/x402.json` - MCP Manifest: `https://aegisaudit.org/.well-known/mcp.json` - ElizaOS Plugin: `https://aegisaudit.org/.well-known/eliza.json` - Coinbase AgentKit Actions: `https://aegisaudit.org/.well-known/agentkit.json` - A2A Agent Card: `https://aegisaudit.org/.well-known/agent.json` - Agent Quickstart Guide: `https://aegisaudit.org/AGENTS.md` - TypeScript SDK: `https://aegisaudit.org/sdk/ts` | Python SDK: `https://aegisaudit.org/sdk/python` ## 6. TypeScript Interfaces export type RiskTier = 'VERY_LOW' | 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL'; export type AgentRecommendation = 'SAFE_TO_EXECUTE' | 'CAUTION_HIGH_SLIPPAGE' | 'AVOID_TRADING' | 'REJECT_HONEYPOT'; export interface TokenAuditReport { token: { address: string; chain: 'base' | 'ethereum' | 'solana'; symbol: string; name: string; decimals: number }; security: { isHoneypot: boolean; buyTaxPercent: number; sellTaxPercent: number; canTakeBackOwnership: boolean; ownerAddress: string | null }; market: { priceUsd: number; liquidityUsd: number; fdvUsd: number; volume24hUsd: number; pairAddress: string; dexName: string; pairAgeHours: number }; assessment: { riskScore: number; riskTier: RiskTier; agentRecommendation: AgentRecommendation; warningFlags: string[]; summary: string }; metadata: { auditedAt: string; engineVersion: string; latencyMs: number; protocol: 'x402-v2'; settledIn: 'USDC' }; }