{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vaultvision-tech/json-schema/vaultvision-tech-vault-card-schema.json",
  "title": "VaultCard",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vaultvision-tech-openapi.json#/components/schemas/VaultCard",
  "allOf": [
    {
      "$ref": "#/$defs/VaultBase"
    },
    {
      "type": "object",
      "required": [
        "risk_score",
        "risk_band",
        "entry_score",
        "entry_label",
        "data_risk_label",
        "rank_verified",
        "rank_risk_adjusted"
      ],
      "properties": {
        "risk_score": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "maximum": 100
        },
        "risk_band": {
          "type": [
            "string",
            "null"
          ]
        },
        "entry_score": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "maximum": 100
        },
        "entry_label": {
          "type": [
            "string",
            "null"
          ]
        },
        "data_risk_label": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "low",
            "moderate",
            "high"
          ]
        },
        "rank_verified": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1
        },
        "rank_risk_adjusted": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1
        }
      }
    }
  ],
  "$defs": {
    "VaultBase": {
      "type": "object",
      "required": [
        "vault_id",
        "protocol",
        "vault_name",
        "vault_type",
        "deposit_asset",
        "redeem_period_days",
        "tvl_usd",
        "apr",
        "age_days",
        "quality_label",
        "external_url",
        "vaultvision_url",
        "updated_ts",
        "accepts_deposits",
        "deposit_status",
        "deposit_capacity_usd",
        "closed_reason",
        "lockup_seconds",
        "leader_fraction",
        "leader_commission",
        "deposit_status_ts"
      ],
      "properties": {
        "vault_id": {
          "type": "string"
        },
        "protocol": {
          "type": "string"
        },
        "vault_name": {
          "type": "string"
        },
        "vault_type": {
          "type": "string"
        },
        "deposit_asset": {
          "type": "string"
        },
        "redeem_period_days": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "tvl_usd": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "apr": {
          "type": [
            "number",
            "null"
          ],
          "description": "Current annualized performance value as a decimal; not guaranteed yield"
        },
        "cum_return_30d": {
          "type": [
            "number",
            "null"
          ],
          "description": "Deposit-neutral cumulative 30-day return as a decimal"
        },
        "cum_return_90d": {
          "type": [
            "number",
            "null"
          ],
          "description": "Deposit-neutral cumulative 90-day return as a decimal"
        },
        "max_drawdown_30d": {
          "type": [
            "number",
            "null"
          ],
          "description": "Derived 30-day peak-to-trough drawdown as a decimal; clients should use its absolute magnitude"
        },
        "data_points_30d": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "data_points_90d": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "analytics_date_ts": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        },
        "age_days": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "quality_label": {
          "type": "string",
          "enum": [
            "real",
            "derived",
            "simulated",
            "demo"
          ]
        },
        "external_url": {
          "type": "string",
          "description": "Source product URL or an empty string"
        },
        "vaultvision_url": {
          "type": "string",
          "format": "uri"
        },
        "updated_ts": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        },
        "accepts_deposits": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "deposit_status": {
          "type": [
            "string",
            "null"
          ]
        },
        "deposit_capacity_usd": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "closed_reason": {
          "type": [
            "string",
            "null"
          ]
        },
        "lockup_seconds": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0
        },
        "leader_fraction": {
          "type": [
            "number",
            "null"
          ]
        },
        "leader_commission": {
          "type": [
            "number",
            "null"
          ]
        },
        "deposit_status_ts": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64"
        }
      }
    }
  }
}