75trust / 100

Defi Fees

by Tanod chainpeek in Onchain & crypto

x402 APIPassing, checked 3 h ago

chainpeek (Tanod) protocol fees and revenue over 24 hours to all time, from cached DefiLlama data. Use when an agent must judge what a protocol earns: its fees and revenue over 24 hours, 7 days, 30 days and a year.

POST https://tanod.dev/v1/defi/fees

Last 30 days

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed

Uptime
100%
Response time
347 ms typical, 347 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

POST https://tanod.dev/v1/defi/fees

Each call costs $0.002 in USDC on Base, paid with the request over x402.

Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.

Example request

From the listing.

POST https://tanod.dev/v1/defi/fees
content-type: application/json

{
  "protocol": "aave"
}

Parameters

ParameterTypeRequiredDescription
protocolstringYesProtocol (or chain) name or slug, e.g. aave, uniswap, lido, ethereum (a parent such as aave sums its versions). An unknown name is a 422 with suggestions.

Example response

The provider's example. We can't check it without paying.

Example response, 81 lines
{
  "as_of": "2026-10-13T03:45:23Z",
  "cache_age_hours": 0,
  "note": "Fees are what users pay a protocol or chain; revenue is the part DefiLlama counts as kept by the protocol (its definition is in `methodology`; it can differ from what token holders receive). 24h, 7d and 30d are rolling windows; each change compares a window with the previous window of the same length. A parent protocol (for example Aave) sums its versions. Cached data, not live: see as_of. Informational only, not investment advice.",
  "other_matches": [],
  "protocol": {
    "category": "Lending",
    "chains": [
      "Polygon",
      "Fantom",
      "Arbitrum",
      "Avalanche",
      "OP Mainnet",
      "Ethereum",
      "Metis",
      "Base",
      "Gnosis",
      "BSC",
      "Scroll",
      "ZKsync Era",
      "Linea",
      "Celo",
      "Sonic",
      "Soneium",
      "Plasma",
      "Mantle",
      "MegaETH",
      "X Layer"
    ],
    "fees": {
      "1y_usd": 693109673,
      "24h_usd": 1243208,
      "30d_usd": 38138385,
      "7d_usd": 9443033,
      "all_time_usd": 2327563802,
      "change_1d_pct": 3.86,
      "change_30d_pct": 11.24,
      "change_7d_pct": 7.33
    },
    "methodology": {
      "fees": "Include borrow interest, flashloan fee, liquidation fee, penalty paid by borrowers, swap fees from Paraswap, and Chainlink SVR (MEV recapture from Ethereum liquidations).",
      "revenue": "Amount of fees go to Aave treasury."
    },
    "name": "Aave",
    "revenue": {
      "1y_usd": 89657550,
      "24h_usd": 161854,
      "30d_usd": 4948886,
      "7d_usd": 1192162,
      "all_time_usd": 314789412,
      "change_1d_pct": 4.69,
      "change_30d_pct": 4.84,
      "change_7d_pct": 5.2
    },
    "revenue_to_fees_30d_pct": 12.98,
    "slug": "aave",
    "type": "parent",
    "versions": [
      {
        "fees_30d_usd": 37051446,
        "name": "Aave V3",
        "revenue_30d_usd": 4675859,
        "slug": "aave-v3"
      },
      {
        "fees_30d_usd": 925779,
        "name": "Aave V4",
        "revenue_30d_usd": 130244,
        "slug": "aave-v4"
      },
      {
        "fees_30d_usd": 161160,
        "name": "Aave V2",
        "revenue_30d_usd": 142783,
        "slug": "aave-v2"
      }
    ]
  },
  "source": "Data: DefiLlama (used with permission), served from Tanod's cache, refreshed every few hours",
  "stale": false
}

Call it from code

The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.002.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://tanod.dev/v1/defi/fees' \
  -H 'content-type: application/json' \
  --data-raw '{"protocol":"aave"}'

# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://tanod.dev/v1/defi/fees' \
  -H 'content-type: application/json' \
  --data-raw '{"protocol":"aave"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

// Pays at most $0.002 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.002" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.002 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Ftanod.dev%2Fv1%2Fdefi%2Ffees&method=POST
const res = await pay("https://tanod.dev/v1/defi/fees", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "protocol": "aave"
  }),
});
console.log(res.status, await res.text());
Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

# Pays at most $0.002 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.002"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://tanod.dev/v1/defi/fees",
        json={
            "protocol": "aave",
        },
    )
    print(res.status_code, res.text)

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402391 ms$0.002
7 h agoPassed402347 ms$0.002
16 h agoPassed402269 ms$0.002