{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pigi-finance/json-schema/pigi-finance-vault-schema.json",
  "title": "Vault",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pigi-finance-openapi.yml#/components/schemas/Vault",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer"
    },
    "strategy_id": {
      "type": "integer"
    },
    "protocol_name": {
      "type": "string"
    },
    "chain_id": {
      "type": "integer"
    },
    "pool_name": {
      "type": "string"
    },
    "pool_address": {
      "type": "string"
    },
    "asset_address": {
      "type": [
        "string",
        "null"
      ]
    },
    "type": {
      "type": "string"
    },
    "tvl_30d_ma": {
      "type": [
        "number",
        "null"
      ]
    },
    "apr_30d_ma": {
      "type": [
        "number",
        "null"
      ]
    },
    "display_name": {
      "type": [
        "string",
        "null"
      ],
      "description": "pool_name plus the minimum qualifier (chain · symbol · framework) that makes it unique. Prefer this for display; null until the row's first nightly."
    },
    "holders": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Holder count. Every plan. null while the vault's last holders scan failed verification."
    },
    "pool_creation_date": {
      "type": [
        "string",
        "null"
      ]
    },
    "updated_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "tvl_flow_1d": {
      "type": [
        "number",
        "null"
      ]
    },
    "tvl_flow_7d": {
      "type": [
        "number",
        "null"
      ]
    },
    "apr_trend_1d": {
      "type": [
        "number",
        "null"
      ]
    },
    "risk_band": {
      "type": [
        "string",
        "null"
      ],
      "description": "Published pigi-risk band: A (safest) .. F, displayed by pigi as A(rb) .. F(rb). A relative risk-of-loss assessment, not a credit rating. null when the vault has not been assessed yet."
    },
    "risk_score": {
      "type": [
        "number",
        "null"
      ],
      "description": "Published overall risk score, 0-100 (higher = safer). null when unassessed."
    },
    "active_addresses_30d": {
      "type": [
        "integer",
        "null"
      ],
      "x-plan": "pro",
      "description": "PRO. Distinct depositors in the trailing 30 days ending at the last scan: owner addresses on ERC-4626 Deposit logs (Morpho, Euler, Yearn); for Uniswap V3 the current owners of positions minted inside the window. null + plan_required on Free; null with no marker until the vault has been scanned (Aave reserves are not scanned)."
    },
    "deposit_count": {
      "type": [
        "integer",
        "null"
      ],
      "x-plan": "pro",
      "description": "PRO. Deposit events over the vault's indexed life: ERC-4626 Deposit logs (Morpho, Euler, Yearn, generic 4626), pool Mint logs for Uniswap V3; withdrawals are not counted. null + plan_required on Free; null with no marker until the vault has been scanned with per-address storage (Aave reserves are not scanned)."
    },
    "tvl_concentration_top10pct": {
      "type": [
        "number",
        "null"
      ],
      "x-plan": "pro",
      "description": "PRO. % of TVL held by the top 10% of holders. null + plan_required on Free; null with no marker while holder analytics are still being indexed."
    }
  }
}