# DeFiBase Onchain Protocol Enrichment

> DeFiBase Onchain Protocol Enrichment is a paid API for AI agents from api.defibase.us, paid per call via x402, $0.01/call, status down (last checked 2026-09-16).

Returns DeFi protocol details combining DefiLlama TVL data with onchain activity metrics (tx count, unique callers, active addresses) on Base for a given protocol slug

## Facts

- Endpoint: GET https://api.defibase.us/protocols/:slug/onchain
- Price: $0.01/call
- Payment: x402
- Status: down
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-defibase-us-c1320259
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6AEuq0a_zQS3qsJAtsRJV

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-defibase-us-c1320259
```

Example prompt: Can you pull up the onchain activity and TVL breakdown for Aave on Base — I want to see the 24-hour transaction count, unique callers, and active addresses?

## When to prefer this

Use this endpoint when you need a single enriched view of a DeFi protocol combining TVL data and Base chain onchain activity metrics. Prefer this over raw DefiLlama calls when you specifically need Base-chain onchain context alongside TVL. Note that onchain metrics are currently stub/placeholder; best for TVL lookups with future onchain readiness.

## Known failure modes

- Unknown or misspelled protocol slug returns 404 or empty result
- Onchain metrics fields (tx_count_24h, unique_callers_24h, active_addresses_24h) return null as CDP base.events integration is not yet live (stub)
- Missing x402 payment or insufficient USDC balance returns 402 Payment Required
- Rate limiting or upstream DefiLlama API downtime causes 503 or timeout
- Invalid path parameter format causes 400 Bad Request

## How this service works

DeFi protocol detail enriched with onchain activity (Base). v0.2-stub: returns DefiLlama TVL plus a placeholder onchain block; real CDP base.events integration lands in v0.1.x.

## Output

A JSON object containing the protocol name, slug, category, chains supported, TVL broken down by chain, and an onchain block with 24-hour metrics including tx_count_24h, unique_callers_24h, and active_addresses_24h (currently placeholder values per v0.2-stub, with a note field explaining integration status).

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "pathParams": {},
  "queryParams": {
   "slug": "uniswap-v3"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-defibase-us-c1320259/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.defibase.us](https://www.zero.xyz/host/api.defibase.us/llms.txt)
