{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/atlasyield-club/json-schema/atlasyield-club-vault-factors-schema.json",
  "title": "VaultFactors",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/atlasyield-club-openapi.json#/components/schemas/VaultFactors",
  "type": "object",
  "properties": {
    "vaultId": {
      "type": "string"
    },
    "chainId": {
      "type": "integer"
    },
    "protocolId": {
      "type": "string"
    },
    "composite": {
      "type": "number"
    },
    "label": {
      "type": "string",
      "enum": [
        "Conservative",
        "Balanced",
        "Aggressive"
      ]
    },
    "pillarScores": {
      "type": "object",
      "properties": {
        "yield": {
          "type": "number"
        },
        "safety": {
          "type": "number"
        },
        "liquidity": {
          "type": "number"
        },
        "sustainability": {
          "type": "number"
        }
      }
    },
    "factors": {
      "type": "object",
      "description": "All 16 factors keyed by name: YIELD_LEVEL, APY_STABILITY, APY_PERSISTENCE, YIELD_SOURCE, AUDIT_QUALITY, PROTOCOL_MATURITY, TVL_DEPTH_SAFETY, TVL_STABILITY, ADMIN_TOPOLOGY, CHAIN_SECURITY, EXPLOIT_HISTORY, WITHDRAWAL_TYPE, TVL_DEPTH_LIQUIDITY, EMISSION_DEPENDENCY, ASSET_RISK, UTILIZATION_HEALTH.",
      "additionalProperties": {
        "$ref": "#/$defs/FactorResult"
      }
    },
    "dataQuality": {
      "type": "string",
      "enum": [
        "sufficient",
        "partial",
        "fallback"
      ]
    },
    "scoredAt": {
      "type": "string",
      "format": "date-time"
    },
    "scorerVersion": {
      "type": "string"
    }
  },
  "$defs": {
    "FactorResult": {
      "type": "object",
      "properties": {
        "score": {
          "type": "number",
          "description": "Sub-score 0–100. For EXPLOIT_HISTORY this is multiplier × 100."
        },
        "weight": {
          "type": "number",
          "description": "Weight inside its pillar's arithmetic mean. 0 for EXPLOIT_HISTORY (multiplicative)."
        },
        "rawValue": {
          "type": "number",
          "description": "The raw input that drove the score (TVL USD, audit count, slope, ...)."
        },
        "label": {
          "type": "string",
          "description": "Plain-English description of the input."
        },
        "pillar": {
          "type": "string",
          "enum": [
            "yield",
            "safety",
            "liquidity",
            "sustainability"
          ]
        }
      }
    }
  }
}