{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cleartracedata-com/json-schema/cleartracedata-com-attribution-response-schema.json",
  "title": "AttributionResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cleartracedata-com-core-data-api-openapi.yml#/components/schemas/AttributionResponse",
  "properties": {
    "records": {
      "items": {
        "$ref": "#/$defs/AttributionRecord"
      },
      "type": "array",
      "title": "Records",
      "description": "Paginated list of attribution records."
    },
    "total": {
      "type": "integer",
      "title": "Total",
      "description": "Total number of matching records."
    },
    "limit": {
      "type": "integer",
      "title": "Limit",
      "description": "The maximum number of records returned."
    },
    "offset": {
      "type": "integer",
      "title": "Offset",
      "description": "The offset used for pagination."
    }
  },
  "type": "object",
  "required": [
    "records",
    "total",
    "limit",
    "offset"
  ],
  "$defs": {
    "AttributionRecord": {
      "properties": {
        "resolved_contract_name": {
          "type": "string",
          "title": "Resolved Contract Name",
          "description": "The identified project, contract name, or unknown entity."
        },
        "blockchain": {
          "type": "string",
          "title": "Blockchain",
          "description": "The blockchain network."
        },
        "total_volume_usd": {
          "type": "number",
          "title": "Total Volume Usd",
          "description": "Total USD volume attributed to this contract. This is the sum of the four PARTITION columns (`aggregator_partner_volume_usd`, `aggregator_volume_usd`, `direct_volume_usd`, `proxy_volume_usd`) and deliberately EXCLUDES the overlay columns (`calldata_suffix_volume_usd`, `erc20_fee_volume_usd`), so summing every volume field double-counts."
        },
        "aggregator_partner_volume_usd": {
          "type": "number",
          "title": "Aggregator Partner Volume Usd",
          "description": "Volume explicitly tagged with an aggregator partner code. Partition column: this and `aggregator_volume_usd`, `direct_volume_usd` and `proxy_volume_usd` sum to `total_volume_usd`."
        },
        "aggregator_volume_usd": {
          "type": "number",
          "title": "Aggregator Volume Usd",
          "description": "Standard aggregator volume. Partition column: this and `aggregator_volume_usd`, `direct_volume_usd` and `proxy_volume_usd` sum to `total_volume_usd`."
        },
        "calldata_suffix_volume_usd": {
          "type": "number",
          "title": "Calldata Suffix Volume Usd",
          "description": "Volume attributed via calldata suffix fingerprinting. OVERLAY, not a component of `total_volume_usd`: it re-describes dollars already counted in the partition columns, seen through a different attribution vector, and is deliberately excluded from the total. It may therefore EXCEED `total_volume_usd`, which is correct and not a bug. Never add it to a partition column: that double-counts."
        },
        "direct_volume_usd": {
          "type": "number",
          "title": "Direct Volume Usd",
          "description": "Volume routed directly to DEX pools. Partition column: this and `aggregator_volume_usd`, `direct_volume_usd` and `proxy_volume_usd` sum to `total_volume_usd`."
        },
        "erc20_fee_volume_usd": {
          "type": "number",
          "title": "Erc20 Fee Volume Usd",
          "description": "Volume attributed via secondary fee transfers: the fee-kickback vector credits the full trade amount to every intermediate transfer recipient in a transaction, so pools, vaults and multisigs accumulate large figures without being swap venues. OVERLAY, not a component of `total_volume_usd`: it re-describes dollars already counted in the partition columns, seen through a different attribution vector, and is deliberately excluded from the total. It may therefore EXCEED `total_volume_usd`, which is correct and not a bug. Never add it to a partition column: that double-counts."
        },
        "proxy_volume_usd": {
          "type": "number",
          "title": "Proxy Volume Usd",
          "description": "Volume routed through an unverified proxy before hitting DEX pools. Partition column: this and `aggregator_volume_usd`, `direct_volume_usd` and `proxy_volume_usd` sum to `total_volume_usd`."
        }
      },
      "type": "object",
      "required": [
        "resolved_contract_name",
        "blockchain",
        "total_volume_usd",
        "aggregator_partner_volume_usd",
        "aggregator_volume_usd",
        "calldata_suffix_volume_usd",
        "direct_volume_usd",
        "erc20_fee_volume_usd",
        "proxy_volume_usd"
      ],
      "title": "AttributionRecord"
    }
  }
}