Side-by-side DeFi pool comparison: APY, TVL, and sustainability scoring via x402 on Base.
What it does
The `/api/defi/pool-compare` endpoint is part of DeFi Shield, a suite of 69 paid API endpoints providing security intelligence for autonomous AI agents. This specific endpoint performs side-by-side pool comparisons, returning data on APY, TVL, and sustainability metrics. It accepts POST requests and costs $0.50 per call, paid in USDC on Base via the x402 protocol.
DeFi Shield is designed for agent-to-agent commerce: an AI agent sends a POST request with an x402 payment header, the facilitator verifies the USDC payment on Base, and the endpoint returns JSON results. Payment settles only on a successful response. Each endpoint also supports free GET-based discovery that returns schema information and an `llm_usage_prompt` to help agents understand how to call it.
The platform offers discovery mechanisms including a health endpoint (`/api/health`) listing all endpoints and pricing, an analytics endpoint (`/api/analytics`), and an A2A discovery card at `/.well-known/agent-card.json`. No OpenAPI spec or detailed request/response schema was found during probing, so the exact input parameters and output format for pool-compare must be inferred or discovered via the free GET endpoint.
Capabilities
Use cases
- —AI agents comparing DeFi liquidity pools before allocating capital
- —Automated yield farming strategies that need to evaluate pool sustainability
- —Portfolio management agents selecting optimal pools across protocols
- —Risk assessment workflows comparing TVL stability and APY decomposition across pools
- —Agent-driven dashboards surfacing the best risk-adjusted pool opportunities
Fit
Best for
- —Autonomous AI agents needing programmatic DeFi pool intelligence
- —Yield optimization bots comparing pools by APY and sustainability
- —DeFi risk analysis pipelines that evaluate multiple pools side-by-side
Not for
- —Manual/human-only DeFi research without x402 payment infrastructure
- —Real-time trading execution — this is an analytics endpoint, not a DEX router
- —Non-EVM or non-DeFi use cases
Quick start
# Free discovery (returns schema + llm_usage_prompt)
curl https://defi-shield-hazel.vercel.app/api/defi/pool-compare
# Paid request (requires x402 payment header)
curl -X POST https://defi-shield-hazel.vercel.app/api/defi/pool-compare \
-H "Content-Type: application/json" \
-H "X-PAYMENT: <x402-payment-token>" \
-d '{"pools": ["0xPoolA...", "0xPoolB..."]}'Example
Request
{
"pools": [
"0xPoolAddressA",
"0xPoolAddressB"
]
}Endpoint
Quality
The endpoint is live (402 challenge confirmed) and the landing page provides clear pricing ($0.50/call) and a high-level feature description. However, no OpenAPI spec, detailed docs, request/response schemas, or example responses were found. The request body format is inferred from analogous endpoints on the same platform.
Warnings
- —No OpenAPI or JSON schema available — request/response format is inferred, not documented
- —The x402 challenge object returned empty ({}) which may indicate incomplete payment metadata
- —No dedicated docs page found (404 at /docs)
- —Example request JSON is speculative based on endpoint name; actual required parameters unknown
Citations
- —Pool-compare endpoint costs $0.50 per call and provides side-by-side pool comparison: APY, TVL, sustainabilityhttps://defi-shield-hazel.vercel.app
- —DeFi Shield has 69 paid API endpoints using x402 protocol with USDC on Basehttps://defi-shield-hazel.vercel.app
- —Payment settles only on successful responsehttps://defi-shield-hazel.vercel.app
- —Each endpoint supports free GET-based discovery with llm_usage_prompthttps://defi-shield-hazel.vercel.app
- —Endpoint returned HTTP 402 on POST probe confirming it is livehttps://defi-shield-hazel.vercel.app/api/defi/pool-compare