DEV Community

imokokok
imokokok

Posted on

Insight: a pre-trade safety oracle API for AI agents — paid per call via x402 on Base

TL;DR: Insight gives AI agents a pre-trade safety check for DeFi — oracle-manipulation-aware PASS/WARN/BLOCK verdicts, each check optionally backed by an EIP-712 signed attestation that anyone can verify from the signature bytes alone. Paid per call with USDC via x402 on Base mainnet. No signup, no API key for the paid path — the payment IS the auth.

Why

If you're building an agent that swaps or borrows on-chain, price-feed integrity is the attack surface you don't control. Flash-loan oracle manipulation is still one of the most common exploit patterns. Insight checks the trade before execution: consensus price across providers, cross-provider agreement, stale-data risk, manipulation risk score, and a recommended max position — returned as a single verdict.

Integration

REST (x402, $0.02/call in USDC):​

curl "https://www.oracleinsight.xyz/api/v1/safety/pre-trade?asset=ETH&chainId=1&action=swap&tradeAmountUsd=1000"
Enter fullscreen mode Exit fullscreen mode

The 402 response carries a standard x402 v2 challenge; any x402 client library (e.g. the official x402-fetch wrapper) signs and retries automatically. Gasless for the caller (EIP-3009 transferWithAuthorization).

Keyless verification (free):​

curl -X POST https://www.oracleinsight.xyz/api/v1/safety/attestation/verify \
  -H "Content-Type: application/json" \
  -d '{ ...attestation... }'
Enter fullscreen mode Exit fullscreen mode

MCP (40 tools, streamable HTTP):​

https://www.oracleinsight.xyz/api/mcp
Enter fullscreen mode Exit fullscreen mode

Anonymous initialize / tools/list — browse the whole catalog with no credentials. Single tools/call is metered on-chain via x402, priced by tool class ($0.002–$0.04); failed calls are never charged (settlement only happens after a successful tool result).

Discovery

Everything is self-describing, so agents can find and use it without a human:

  • /.well-known/x402 — x402 resource manifest
  • /.well-known/mcp/server-card.json — SEP-1649 static server card (40 tools)
  • /llms.txt, /openapi.json

Also listed on the official MCP Registry (io.github.imokokok/insight-oracle), Smithery (@imokokok123/insight-oracle), agent402.tools, and the CDP Bazaar.

Feedback welcome

Particularly interested in: agent-framework integrations (LangChain / Eliza / GAME), additional chains, and what other pre-trade signals you'd want checked. Repo is at github.com/imokokok/Insight.

Top comments (0)