{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/philidor-io/json-schema/philidor-io-vault-detail-response-schema.json",
  "title": "VaultDetailResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/philidor-io-vaults-api-openapi.yml#/components/schemas/VaultDetailResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "vault": {
          "$ref": "#/$defs/VaultDetail"
        },
        "snapshots": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Snapshot"
          }
        },
        "events": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Event"
          }
        },
        "rewards": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Reward"
          }
        },
        "wraps": {
          "$ref": "#/$defs/VaultWraps"
        },
        "strategyTransparency": {
          "$ref": "#/$defs/VaultStrategyTransparency"
        }
      },
      "required": [
        "vault",
        "snapshots",
        "events",
        "rewards",
        "wraps",
        "strategyTransparency"
      ]
    }
  },
  "required": [
    "data"
  ],
  "$defs": {
    "AuditEngagement": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string"
        },
        "auditor": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "standard",
            "contest",
            "formal_verification"
          ]
        },
        "url": {
          "type": "string"
        },
        "scope": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Contracts/modules the engagement covered, as stated by the report."
        },
        "unauditedSurface": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Parts the report EXPLICITLY declared out of scope. Absent = the report did not say — never \"fully covered\"."
        },
        "findings": {
          "type": "object",
          "properties": {
            "critical": {
              "type": "number"
            },
            "high": {
              "type": "number"
            },
            "medium": {
              "type": "number"
            },
            "low": {
              "type": "number"
            }
          },
          "description": "Findings by severity, as published by the report."
        },
        "auditedRef": {
          "type": "string",
          "description": "Commit or release the engagement audited."
        },
        "remediated": {
          "type": "boolean"
        }
      },
      "required": [
        "date",
        "auditor",
        "type"
      ]
    },
    "Event": {
      "type": "object",
      "properties": {
        "id": {
          "type": "number"
        },
        "vault_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "curator_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "protocol_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "protocol_version": {
          "type": [
            "string",
            "null"
          ]
        },
        "chain_id": {
          "type": [
            "number",
            "null"
          ]
        },
        "event_type": {
          "type": "string"
        },
        "severity": {
          "type": "string",
          "enum": [
            "Info",
            "Warning",
            "Critical"
          ]
        },
        "title": {
          "type": "string"
        },
        "description": {
          "type": [
            "string",
            "null"
          ]
        },
        "tx_hash": {
          "type": [
            "string",
            "null"
          ]
        },
        "block_number": {
          "type": [
            "number",
            "null"
          ]
        },
        "links": {},
        "occurred_at": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "incident_scope": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "vault",
            "protocol",
            "curator",
            null
          ]
        },
        "incident_severity": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "minor",
            "major",
            null
          ]
        },
        "loss_amount_usd": {
          "type": [
            "number",
            "null"
          ]
        },
        "remediation_status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "resolved",
            "unresolved",
            null
          ]
        },
        "user_compensation": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "full",
            "partial",
            "none",
            null
          ]
        },
        "post_mortem_url": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "vault_id",
        "curator_id",
        "protocol_id",
        "protocol_version",
        "chain_id",
        "event_type",
        "severity",
        "title",
        "description",
        "tx_hash",
        "block_number",
        "occurred_at",
        "created_at",
        "incident_scope",
        "incident_severity",
        "loss_amount_usd",
        "remediation_status",
        "user_compensation",
        "post_mortem_url"
      ]
    },
    "PendlePositionView": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            },
            "reason": {
              "type": "string",
              "enum": [
                "missing_or_invalid_facts"
              ]
            },
            "as_of": {
              "type": "string"
            }
          },
          "required": [
            "status",
            "reason",
            "as_of"
          ]
        },
        {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "available"
              ]
            },
            "as_of": {
              "type": "string"
            },
            "facts": {
              "type": "object",
              "properties": {
                "schemaVersion": {
                  "type": "string",
                  "enum": [
                    "pendle-position-v1"
                  ]
                },
                "chainId": {
                  "type": "number",
                  "enum": [
                    1
                  ]
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "pt",
                    "lp"
                  ]
                },
                "positionAddress": {
                  "type": "string",
                  "pattern": "^0x[0-9a-f]{40}$"
                },
                "marketAddresses": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "pattern": "^0x[0-9a-f]{40}$"
                  },
                  "minItems": 1,
                  "maxItems": 100
                },
                "ptAddress": {
                  "type": "string",
                  "pattern": "^0x[0-9a-f]{40}$"
                },
                "syAddress": {
                  "type": "string",
                  "pattern": "^0x[0-9a-f]{40}$"
                },
                "underlyingAddress": {
                  "type": "string",
                  "pattern": "^0x[0-9a-f]{40}$"
                },
                "accountingAssetAddress": {
                  "type": "string",
                  "pattern": "^0x[0-9a-f]{40}$"
                },
                "expiryUnixSeconds": {
                  "type": "string",
                  "pattern": "^[1-9][0-9]{0,11}$"
                },
                "maturityDate": {
                  "type": "string",
                  "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
                },
                "fixedYield": {
                  "type": "object",
                  "properties": {
                    "impliedApy": {
                      "type": [
                        "number",
                        "null"
                      ],
                      "exclusiveMinimum": -1
                    },
                    "source": {
                      "type": "string",
                      "enum": [
                        "pendle_api"
                      ]
                    },
                    "retrievedAt": {
                      "type": "string"
                    },
                    "publishedAt": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "impliedApy",
                    "source",
                    "retrievedAt",
                    "publishedAt"
                  ],
                  "additionalProperties": false
                },
                "floatingYield": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "not_applicable"
                          ]
                        },
                        "reason": {
                          "type": "string",
                          "enum": [
                            "principal_token_discount"
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "reason"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "unavailable"
                          ]
                        },
                        "reason": {
                          "type": "string",
                          "enum": [
                            "lp_fixed_component_not_separated"
                          ]
                        }
                      },
                      "required": [
                        "status",
                        "reason"
                      ],
                      "additionalProperties": false
                    }
                  ]
                },
                "oracle": {
                  "type": "object",
                  "properties": {
                    "method": {
                      "type": "string",
                      "enum": [
                        "unknown"
                      ]
                    },
                    "reason": {
                      "type": "string",
                      "enum": [
                        "no_collateral_oracle_classified"
                      ]
                    }
                  },
                  "required": [
                    "method",
                    "reason"
                  ],
                  "additionalProperties": false
                },
                "valuation": {
                  "type": "object",
                  "properties": {
                    "basis": {
                      "type": "string",
                      "enum": [
                        "outstanding_pt_supply",
                        "lp_share_supply"
                      ]
                    },
                    "rawTotalSupply": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]{0,77})$"
                    },
                    "decimals": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 36
                    },
                    "usdPrice": {
                      "type": "string",
                      "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,18})?$"
                    },
                    "quoteRetrievedAt": {
                      "type": "string"
                    },
                    "quotePublishedAt": {
                      "type": "null"
                    },
                    "quoteSourceUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "quoteResponseSha256": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "reserveEvidence": {
                      "type": "object",
                      "properties": {
                        "method": {
                          "type": "string",
                          "enum": [
                            "market_read_state"
                          ]
                        },
                        "pt": {
                          "type": "object",
                          "properties": {
                            "address": {
                              "type": "string",
                              "pattern": "^0x[0-9a-f]{40}$"
                            },
                            "rawAmount": {
                              "type": "string",
                              "pattern": "^(0|[1-9][0-9]{0,77})$"
                            },
                            "decimals": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 36
                            },
                            "usdPrice": {
                              "type": "string",
                              "maxLength": 330,
                              "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,18})?$"
                            },
                            "quoteRetrievedAt": {
                              "type": "string"
                            },
                            "quotePublishedAt": {
                              "type": "null"
                            },
                            "quoteSourceUrl": {
                              "type": "string",
                              "format": "uri"
                            },
                            "quoteResponseSha256": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{64}$"
                            }
                          },
                          "required": [
                            "address",
                            "rawAmount",
                            "decimals",
                            "usdPrice",
                            "quoteRetrievedAt",
                            "quotePublishedAt",
                            "quoteSourceUrl",
                            "quoteResponseSha256"
                          ],
                          "additionalProperties": false
                        },
                        "sy": {
                          "type": "object",
                          "properties": {
                            "address": {
                              "type": "string",
                              "pattern": "^0x[0-9a-f]{40}$"
                            },
                            "rawAmount": {
                              "type": "string",
                              "pattern": "^(0|[1-9][0-9]{0,77})$"
                            },
                            "decimals": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 36
                            },
                            "usdPrice": {
                              "type": "string",
                              "maxLength": 330,
                              "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]{1,18})?$"
                            },
                            "quoteRetrievedAt": {
                              "type": "string"
                            },
                            "quotePublishedAt": {
                              "type": "null"
                            },
                            "quoteSourceUrl": {
                              "type": "string",
                              "format": "uri"
                            },
                            "quoteResponseSha256": {
                              "type": "string",
                              "pattern": "^[0-9a-f]{64}$"
                            }
                          },
                          "required": [
                            "address",
                            "rawAmount",
                            "decimals",
                            "usdPrice",
                            "quoteRetrievedAt",
                            "quotePublishedAt",
                            "quoteSourceUrl",
                            "quoteResponseSha256"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "required": [
                        "method",
                        "pt",
                        "sy"
                      ],
                      "additionalProperties": false
                    },
                    "economicOverlap": {
                      "type": "string",
                      "enum": [
                        "pt_supply_includes_lp_holdings",
                        "lp_reserves_include_pt"
                      ]
                    }
                  },
                  "required": [
                    "basis",
                    "rawTotalSupply",
                    "decimals",
                    "usdPrice",
                    "quoteRetrievedAt",
                    "quotePublishedAt",
                    "quoteSourceUrl",
                    "quoteResponseSha256",
                    "economicOverlap"
                  ],
                  "additionalProperties": false
                },
                "provenance": {
                  "type": "object",
                  "properties": {
                    "collectionAsOf": {
                      "type": "string"
                    },
                    "finalizedBlock": {
                      "type": "object",
                      "properties": {
                        "number": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "hash": {
                          "type": "string",
                          "pattern": "^0x[0-9a-f]{64}$"
                        },
                        "timestamp": {
                          "type": "integer",
                          "exclusiveMinimum": 0,
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "number",
                        "hash",
                        "timestamp"
                      ],
                      "additionalProperties": false
                    },
                    "marketSourceUrl": {
                      "type": "string",
                      "format": "uri"
                    },
                    "marketResponseSha256": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{64}$"
                    },
                    "retrievedAt": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "collectionAsOf",
                    "finalizedBlock",
                    "marketSourceUrl",
                    "marketResponseSha256",
                    "retrievedAt"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "schemaVersion",
                "chainId",
                "kind",
                "positionAddress",
                "marketAddresses",
                "ptAddress",
                "syAddress",
                "underlyingAddress",
                "accountingAssetAddress",
                "expiryUnixSeconds",
                "maturityDate",
                "fixedYield",
                "floatingYield",
                "oracle",
                "valuation",
                "provenance"
              ],
              "additionalProperties": false
            },
            "post_maturity_state": {
              "type": "string",
              "enum": [
                "pre_maturity",
                "matured"
              ]
            },
            "effective_fixed_apy": {
              "type": [
                "number",
                "null"
              ]
            },
            "risk_mechanism": {
              "type": "string",
              "enum": [
                "fixed_principal",
                "implied_yield_curve"
              ]
            },
            "valuation_semantics": {
              "type": "string",
              "enum": [
                "overlapping_position_value"
              ]
            },
            "supply_rewards_status": {
              "type": "string",
              "enum": [
                "unavailable"
              ]
            }
          },
          "required": [
            "status",
            "as_of",
            "facts",
            "post_maturity_state",
            "effective_fixed_apy",
            "risk_mechanism",
            "valuation_semantics",
            "supply_rewards_status"
          ]
        }
      ],
      "description": "Retained, validated Ethereum position facts evaluated at response as_of (preserved on cache replay). Fixed APY is an informational source observation, not current executable yield or floating APR. PT and LP position values overlap; do not sum as unique TVL. LP exposure is to the implied-yield curve, not a standard AMM IL model."
    },
    "Reward": {
      "type": "object",
      "properties": {
        "side": {
          "type": "string",
          "enum": [
            "supply"
          ]
        },
        "token_symbol": {
          "type": [
            "string",
            "null"
          ]
        },
        "token_address": {
          "type": [
            "string",
            "null"
          ]
        },
        "apr": {
          "type": [
            "number",
            "null"
          ]
        },
        "reward_type": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "token_incentive",
            "points",
            "trading_fee",
            "strategy",
            null
          ]
        },
        "source": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "merkl_api",
            "morpho_blue_api",
            "protocol_api",
            "onchain",
            null
          ]
        },
        "campaign_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "campaign_onchain_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "distribution_type": {
          "type": [
            "string",
            "null"
          ]
        },
        "source_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "start_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "end_at": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "side",
        "token_symbol",
        "token_address",
        "apr",
        "reward_type"
      ]
    },
    "Snapshot": {
      "type": "object",
      "properties": {
        "recorded_at": {
          "type": "string"
        },
        "tvl_usd": {
          "type": "number"
        },
        "apr_net": {
          "type": [
            "number",
            "null"
          ]
        },
        "base_apr": {
          "type": [
            "number",
            "null"
          ]
        },
        "price_per_share": {
          "type": [
            "number",
            "null"
          ]
        },
        "utilization": {
          "type": [
            "number",
            "null"
          ],
          "description": "Point-in-time utilization (0..1 fraction). Morpho convention: idle liquidity counts at u=0, so it reads lower than a per-market UI, by design. NULL until an adapter emits it."
        },
        "borrow_apr": {
          "type": [
            "number",
            "null"
          ]
        },
        "borrow_rate_basis": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "apr",
            "apy",
            null
          ],
          "description": "Basis of borrow_apr for this snapshot (PHI-136): apy (Aave-V3/Morpho) vs apr (Compound/Spark/Aave-V4). NULL when borrow_apr is NULL."
        },
        "borrow_reward_apr": {
          "type": "number",
          "description": "Point-in-time priced borrower-rebate total. Non-authoritative when borrow_incentive_status is unavailable; never use it to derive net cost in that state."
        },
        "borrow_apr_net": {
          "type": [
            "number",
            "null"
          ]
        },
        "borrow_incentive_status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "observed",
            "none",
            "unavailable",
            "not_applicable",
            null
          ],
          "description": "Point-in-time borrower-incentive evidence status. unavailable means borrow_reward_apr is non-authoritative and borrow_apr_net is NULL."
        }
      },
      "required": [
        "recorded_at",
        "tvl_usd",
        "apr_net",
        "base_apr",
        "price_per_share",
        "utilization",
        "borrow_apr",
        "borrow_rate_basis",
        "borrow_reward_apr",
        "borrow_apr_net",
        "borrow_incentive_status"
      ]
    },
    "Vault": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "address": {
          "type": "string"
        },
        "protocol_id": {
          "type": "string"
        },
        "chain_id": {
          "type": "number"
        },
        "curator_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": "string"
        },
        "symbol": {
          "type": [
            "string",
            "null"
          ]
        },
        "external_id": {
          "type": [
            "string",
            "null"
          ]
        },
        "asset_address": {
          "type": [
            "string",
            "null"
          ]
        },
        "asset_symbol": {
          "type": [
            "string",
            "null"
          ]
        },
        "tvl_usd": {
          "type": "number"
        },
        "apr_net": {
          "type": [
            "number",
            "null"
          ]
        },
        "apr_forward": {
          "type": [
            "number",
            "null"
          ]
        },
        "total_score": {
          "type": [
            "number",
            "null"
          ]
        },
        "risk_tier": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "Prime",
            "Core",
            "Edge",
            null
          ],
          "description": "Published tier (hysteresis-stabilized). May briefly differ from a naive derivation from risk_score while a boundary move is dwelling."
        },
        "capped_by": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "asset": {
              "type": "string",
              "description": "Symbol of the collateral that explains the cap."
            },
            "address": {
              "type": "string",
              "description": "Address of that collateral on the exposure chain."
            },
            "reason": {
              "type": "string",
              "enum": [
                "unevaluated_collateral"
              ],
              "description": "The cap is explained by collateral that is still provisional or unreviewed. total_score and risk_tier are unchanged."
            },
            "label": {
              "type": "string",
              "description": "French badge text for the product UI. Render this string; do not recompute the tier from it."
            }
          },
          "required": [
            "asset",
            "address",
            "reason",
            "label"
          ],
          "description": "Set when asset-quality drag or the unreviewed-collateral rule is binding because of an unevaluated collateral exposure at weight ≥ 5%. Null when the vault is not capped that way, or when the weakest significant collateral is a reviewed judgment. Does not change total_score or risk_tier."
        },
        "risk_vectors": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "asset": {
              "type": "object",
              "properties": {
                "score": {
                  "type": "number"
                },
                "weight": {
                  "type": "number"
                },
                "details": {},
                "exposures": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "address": {
                        "type": "string"
                      },
                      "chainId": {
                        "type": "number"
                      },
                      "category": {
                        "type": "string",
                        "enum": [
                          "native",
                          "fiat_backed_stablecoin",
                          "cdp_stablecoin",
                          "synthetic_stablecoin",
                          "lst",
                          "lrt",
                          "wrapped_btc",
                          "governance_token",
                          "unreviewed"
                        ]
                      },
                      "reviewStatus": {
                        "type": "string",
                        "enum": [
                          "reviewed",
                          "provisional",
                          "unreviewed"
                        ]
                      },
                      "score": {
                        "type": "number"
                      },
                      "weight": {
                        "type": "number"
                      },
                      "suitability": {
                        "type": "string",
                        "enum": [
                          "institutional",
                          "qualified",
                          "speculative",
                          "not_assessed"
                        ]
                      },
                      "capsApplied": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "overlay",
                                "matured_instrument",
                                "backing_ceiling",
                                "review_status",
                                "hard_fail",
                                "override",
                                "staleness",
                                "drag",
                                "fail_safe"
                              ]
                            },
                            "cap": {
                              "type": "number"
                            },
                            "reason": {
                              "type": "string"
                            },
                            "binding": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "type",
                            "cap",
                            "reason",
                            "binding"
                          ]
                        }
                      },
                      "symbol": {
                        "type": "string"
                      },
                      "overlays": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "enum": [
                            "yield_bearing",
                            "lockup"
                          ]
                        }
                      },
                      "weightedScore": {
                        "type": "number"
                      },
                      "dimensionScores": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "dimension": {
                              "type": "string",
                              "enum": [
                                "peg_stability",
                                "issuer_custody",
                                "redeemability",
                                "reserve_transparency",
                                "governance_controls",
                                "protocol_security",
                                "operator_quality",
                                "bridge_mechanism",
                                "dependency_depth",
                                "liquidity",
                                "volatility"
                              ]
                            },
                            "value": {
                              "type": "number"
                            },
                            "effectiveValue": {
                              "type": "number"
                            },
                            "source": {
                              "type": "string"
                            },
                            "sourceDisplay": {
                              "type": "string"
                            },
                            "observedAt": {
                              "type": "string"
                            },
                            "freshUntil": {
                              "type": "string"
                            },
                            "isStale": {
                              "type": "boolean"
                            },
                            "isExpired": {
                              "type": "boolean"
                            },
                            "confidence": {
                              "type": "string",
                              "enum": [
                                "high",
                                "medium",
                                "low"
                              ]
                            }
                          },
                          "required": [
                            "dimension",
                            "value",
                            "effectiveValue",
                            "source",
                            "observedAt",
                            "freshUntil",
                            "isStale",
                            "isExpired",
                            "confidence"
                          ]
                        }
                      },
                      "hardFailFlags": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "flag": {
                              "type": "string",
                              "enum": [
                                "active_depeg",
                                "sanctions_exposure",
                                "redemption_paused",
                                "single_signer_upgrade",
                                "endogenous_collateral_high",
                                "proof_of_reserve_missing",
                                "no_recent_attestation",
                                "unaudited_token_contract"
                              ]
                            },
                            "scoreCap": {
                              "type": "number"
                            },
                            "triggerSource": {
                              "type": "string"
                            },
                            "inCooldown": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "flag",
                            "scoreCap",
                            "triggerSource",
                            "inCooldown"
                          ]
                        }
                      },
                      "activeOverrides": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "scoreCap": {
                              "type": "number"
                            },
                            "reasonCode": {
                              "type": "string"
                            },
                            "reasonDetail": {
                              "type": "string"
                            },
                            "expiresAt": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "autoApproved": {
                              "type": "boolean"
                            },
                            "humanConfirmed": {
                              "type": "boolean"
                            }
                          },
                          "required": [
                            "scoreCap",
                            "reasonCode",
                            "expiresAt"
                          ]
                        }
                      },
                      "upgradeConditions": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      },
                      "oracleSources": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "provider": {
                              "type": "string"
                            },
                            "address": {
                              "type": "string"
                            },
                            "underlying": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "provider"
                          ]
                        }
                      }
                    },
                    "required": [
                      "address",
                      "chainId",
                      "category",
                      "reviewStatus",
                      "score"
                    ]
                  }
                },
                "failSafeMode": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "degraded",
                    "fail_closed"
                  ]
                }
              },
              "required": [
                "score",
                "weight"
              ]
            },
            "platform": {
              "type": "object",
              "properties": {
                "score": {
                  "type": "number"
                },
                "weight": {
                  "type": "number"
                },
                "details": {}
              },
              "required": [
                "score",
                "weight"
              ]
            },
            "control": {
              "type": "object",
              "properties": {
                "score": {
                  "type": "number"
                },
                "weight": {
                  "type": "number"
                },
                "details": {}
              },
              "required": [
                "score",
                "weight"
              ]
            },
            "history": {
              "type": "object",
              "properties": {
                "score": {
                  "type": "number"
                },
                "weight": {
                  "type": "number"
                },
                "tierCeiling": {
                  "type": "number"
                },
                "ceilingApplied": {
                  "type": "boolean"
                },
                "breakdown": {},
                "counts": {}
              },
              "required": [
                "score",
                "weight"
              ]
            },
            "curator": {
              "type": "object",
              "properties": {
                "score": {
                  "type": "number"
                },
                "weight": {
                  "type": "number"
                },
                "scoreDelta": {
                  "type": "number"
                },
                "enabled": {
                  "type": "boolean"
                },
                "coverage": {
                  "type": "string",
                  "enum": [
                    "absent",
                    "present"
                  ]
                },
                "source": {
                  "type": "string",
                  "enum": [
                    "risk_graph_managed_by_edges"
                  ]
                },
                "curatorId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "features": {
                  "type": "object",
                  "properties": {
                    "curatorVaultCount": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "curatorTvlUsd": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "vaultTvlShare": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "tvlConcentrationHhi": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "maxSharedExposureWeb": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "assetKey": {
                          "type": "string"
                        },
                        "vaultCount": {
                          "type": "number"
                        },
                        "exposureUsd": {
                          "type": "string"
                        },
                        "curatorTvlShare": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "assetKey",
                        "vaultCount",
                        "exposureUsd",
                        "curatorTvlShare"
                      ]
                    },
                    "casebookIncidentCount": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "casebookLossUsd": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "curatorVaultCount",
                    "curatorTvlUsd",
                    "vaultTvlShare",
                    "tvlConcentrationHhi",
                    "maxSharedExposureWeb",
                    "casebookIncidentCount",
                    "casebookLossUsd"
                  ]
                },
                "componentScores": {
                  "type": "object",
                  "properties": {
                    "vaultCount": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "sharedExposureWeb": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "tvlConcentration": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "incidentHistory": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "vaultCount",
                    "sharedExposureWeb",
                    "tvlConcentration",
                    "incidentHistory"
                  ]
                },
                "breakdown": {
                  "type": "object",
                  "properties": {
                    "vaultCountPenalty": {
                      "type": "number"
                    },
                    "sharedExposurePenalty": {
                      "type": "number"
                    },
                    "tvlConcentrationPenalty": {
                      "type": "number"
                    },
                    "incidentHistoryPenalty": {
                      "type": "number"
                    },
                    "penaltyWeight": {
                      "type": "number"
                    },
                    "appliedPenalty": {
                      "type": "number"
                    },
                    "rationale": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "vaultCountPenalty",
                    "sharedExposurePenalty",
                    "tvlConcentrationPenalty",
                    "incidentHistoryPenalty",
                    "penaltyWeight",
                    "appliedPenalty",
                    "rationale"
                  ]
                },
                "scoreBefore": {
                  "type": "number"
                },
                "scoreAfter": {
                  "type": "number"
                },
                "adjustmentApplied": {
                  "type": "boolean"
                }
              },
              "required": [
                "score",
                "weight",
                "scoreDelta",
                "enabled",
                "coverage",
                "source",
                "curatorId",
                "features",
                "componentScores",
                "breakdown",
                "scoreBefore",
                "scoreAfter",
                "adjustmentApplied"
              ]
            },
            "provenance": {
              "type": "object",
              "properties": {
                "methodologyVersion": {
                  "type": "number"
                },
                "scoreRunId": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "computedAt": {
                  "type": "string"
                },
                "failSafeMode": {
                  "type": "string",
                  "enum": [
                    "normal",
                    "degraded",
                    "fail_closed"
                  ]
                }
              },
              "required": [
                "methodologyVersion",
                "scoreRunId",
                "computedAt",
                "failSafeMode"
              ]
            }
          }
        },
        "is_active": {
          "type": "boolean"
        },
        "is_shutdown": {
          "type": "boolean"
        },
        "is_depositable": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "True when the vault accepts new deposits over a small dust threshold, sourced from ERC-4626 maxDeposit. Null when not yet indexed or unknown. Prefer `deposit_status` for client logic — it surfaces the tri-state explicitly."
        },
        "deposit_capacity_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "USD-denominated deposit headroom (capacity remaining before hitting the cap). Null when uncapped, when the vault has no TVL reference for pricing, or when not yet indexed."
        },
        "deposit_status": {
          "type": "string",
          "enum": [
            "open",
            "closed",
            "unknown"
          ],
          "description": "Explicit tri-state derived from is_depositable. `open` = accepts new deposits over a $100 dust threshold. `closed` = on-chain maxDeposit == 0 (caps reached, paused, gates blocking, or queue saturated). `unknown` = depositability not yet read on chain (typically non-ERC4626 protocols or a vault added since the last sync). Clients routing capital should treat `closed` as a hard exclude; `unknown` as \"check independently if precision matters.\""
        },
        "withdraw_status": {
          "type": "string",
          "enum": [
            "open",
            "closed",
            "unknown"
          ],
          "description": "Coarse withdrawal-side mirror of deposit_status. `closed` when the vault is in shutdown; `open` when operationally live and we have a confirmed deposit-side reading this cycle; `unknown` when we have no recent on-chain probe. This is intentionally a conservative operational signal — withdrawal-specific pause/gate detection (per-protocol) is on the roadmap. For now: trust `open`, escalate on `closed`, treat `unknown` like deposit-side unknown."
        },
        "freshness_seconds": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Seconds since the most recent successful sync wrote this row, measured at as_of. Use this to enforce a client-side freshness SLA before routing capital — e.g. reject any vault whose freshness_seconds exceeds your tolerance. Null when the vault has never been synced (extremely rare; only seen for legacy rows pre-dating the sync timestamp column)."
        },
        "score_run_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Id of the risk scoring run that produced total_score and risk_tier (PHI-286). Null until the vault has been scored. Rows sharing a run were scored under one methodology pass; compare runs across rows to detect a partially applied recalculation."
        },
        "risk_score_run_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "Score run provenance (alias of score_run_id)"
        },
        "scored_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "Completion time of the score run (alias of score_computed_at)"
        },
        "as_of": {
          "type": "string",
          "description": "Time at which freshness_seconds was measured; preserved on cache replay"
        },
        "score_computed_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "When the scoring run that produced this row completed (ISO 8601). Null until scored. Independent of last_synced_at: a fresh sync can carry an older score."
        },
        "score_updated_at": {
          "type": [
            "string",
            "null"
          ],
          "description": "When the published score or tier last changed VALUE (ISO 8601). Unlike score_computed_at it does not move on a run that re-confirms the same score; the 0.05 deadband means moves smaller than 0.05 are not persisted. Drives /v1/vaults/changes?changed=score."
        },
        "tvl_status": {
          "type": "string",
          "enum": [
            "observed",
            "unavailable"
          ],
          "description": "observed: tvl_usd is a read value; unavailable: the TVL read failed and tvl_usd is served as 0 for compatibility."
        },
        "tvl_semantics": {
          "type": "string",
          "enum": [
            "overlapping_position_value"
          ],
          "description": "Gross value of indexed PT and LP positions. PT supply includes tokens held in LP reserves, so these values overlap and are not unique capital."
        },
        "needs_risk_review": {
          "type": "boolean",
          "description": "True while a data-quality quarantine is active on the vault (a reward-APR reconciliation mismatch with the provider, or a non-finite supply APY observation). The score is still served; treat it as provisional until the flag clears."
        },
        "last_synced_at": {
          "type": "string"
        },
        "created_at": {
          "type": "string"
        },
        "is_stablecoin": {
          "type": "boolean"
        },
        "is_lsd": {
          "type": "boolean"
        },
        "is_single_exposure": {
          "type": "boolean"
        },
        "has_impermanent_loss": {
          "type": "boolean",
          "description": "Legacy coarse LP market-exposure flag. For Pendle it includes LP implied-yield-curve exposure (and unresolved position identity), not a standard AMM IL estimate. A bound direct PT is false. See pendle_position on detail for mechanism and source facts."
        },
        "is_audited": {
          "type": "boolean"
        },
        "is_high_confidence": {
          "type": "boolean",
          "description": "Curated shortlist flag, not a confidence interval: total_score at least 7.5 AND net APR between 3% and 10%. A Prime vault with a lower or higher yield is false here."
        },
        "strategy_type": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "lending",
            "savings",
            "staking",
            "isolated_lending",
            "liquidity_provision",
            "multi_market",
            "auto_compound",
            "yield_aggregation",
            "points_farming",
            "restaking",
            "fixed_rate",
            "leveraged_lending",
            "delta_neutral",
            "options_derivatives",
            null
          ]
        },
        "base_apr": {
          "type": [
            "number",
            "null"
          ]
        },
        "reward_apr": {
          "type": "number",
          "description": "Sum of current itemized reward APRs as a decimal fraction."
        },
        "has_rewards": {
          "type": "boolean"
        },
        "reward_reconciliation_status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "reconciled",
            "provider_mismatch",
            "unavailable",
            null
          ]
        },
        "reward_reconciliation_delta": {
          "type": [
            "number",
            "null"
          ],
          "description": "Morpho provider spot net APY minus the reconstructed base-plus-rewards APR. The base is a trailing average while the provider net is spot, so sub-50bp drift is expected sampling noise; magnitudes over 0.005 are quarantined as provider_mismatch."
        },
        "rewards": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "token_symbol": {
                "type": "string"
              },
              "side": {
                "type": "string",
                "enum": [
                  "supply"
                ]
              },
              "token_address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "apr": {
                "type": "number"
              },
              "reward_type": {
                "type": "string",
                "enum": [
                  "token_incentive",
                  "points",
                  "trading_fee",
                  "strategy"
                ]
              },
              "source": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "merkl_api",
                  "morpho_blue_api",
                  "protocol_api",
                  "onchain",
                  null
                ]
              },
              "campaign_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "campaign_onchain_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "distribution_type": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "source_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "start_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "end_at": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "token_symbol",
              "side",
              "token_address",
              "apr",
              "reward_type"
            ]
          }
        },
        "utilization": {
          "type": [
            "number",
            "null"
          ],
          "description": "Share of vault-held capital actually lent out, as a 0..1 fraction (occasionally >1 in transient over-utilized states). Morpho convention: idle liquidity counts in the denominator at u=0 — idle capital IS the vanity-TVL signal — so these read lower than a per-market UI, by design. Never coalesced to 0 (0 is a real claim: fully idle). NULL when not applicable or not yet emitted."
        },
        "borrow_apr": {
          "type": [
            "number",
            "null"
          ],
          "description": "Average variable interest rate borrowers pay, as a decimal fraction — evidence the yield is real borrow demand rather than emissions. Interpret with borrow_rate_basis: the value is COMPOUNDED APY for Aave-V3/Morpho and NOMINAL APR for Compound/Spark/Aave-V4 (no conversion is applied). NULL when not applicable or not yet emitted."
        },
        "borrow_rate_basis": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "apr",
            "apy",
            null
          ],
          "description": "Basis of borrow_apr (PHI-136): apy = compounded (Aave-V3 borrowInfo.apy, Morpho weighted borrowApy); apr = nominal (Compound/Spark/Aave-V4). Present so mixed bases are not silently read as one. NULL when borrow_apr is NULL."
        },
        "borrow_reward_apr": {
          "type": "number",
          "description": "Sum of priced, reserve-attributable borrow rebate APRs as a decimal fraction. Unpriced points and AAVE_NET_APR net-position campaigns are excluded. When borrow_incentive_status is unavailable, this is the last successfully observed value and must not be combined with the current gross borrow APR."
        },
        "borrow_apr_net": {
          "type": [
            "number",
            "null"
          ],
          "description": "Effective borrow cost: borrow_apr minus borrow_reward_apr. May be negative when borrowers are paid; NULL when gross rate or incentive evidence is unavailable."
        },
        "borrow_incentive_status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "observed",
            "none",
            "unavailable",
            "not_applicable",
            null
          ],
          "description": "Borrow incentive observation quality. none means sources were checked; unavailable means they failed, borrow_apr_net is NULL, and retained borrow_reward_apr/borrow_rewards evidence is non-current and must not be used to calculate net cost."
        },
        "has_borrow_rewards": {
          "type": "boolean"
        },
        "borrow_status": {
          "type": "string",
          "enum": [
            "open",
            "disabled",
            "paused",
            "capped",
            "unknown",
            "not_applicable"
          ],
          "description": "Reserve-level availability for NEW borrowing (PHI-223), independent from liquidity_status and borrow_apr_status. open means the protocol source reports borrowing enabled; disabled means the reserve does not permit borrowing; paused means an emergency/freeze control blocks it; capped means an observed hard borrow cap has no remaining capacity; unknown means the adapter cannot prove availability; not_applicable means no borrow market applies. A zero borrow_apr does not determine this field."
        },
        "fee_rate": {
          "type": [
            "number",
            "null"
          ],
          "description": "Protocol-native fee take rate as a decimal fraction. Informational only — already reflected in apr_net/base_apr and never adjusts them. Interpret with fee_type (the basis differs by type). NULL when the protocol has no take parameter or it is not yet emitted."
        },
        "fee_type": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "reserve_factor",
            "performance_fee",
            "liquidity_fee",
            null
          ],
          "description": "Discriminator for fee_rate: reserve_factor = cut of borrower interest; performance_fee = cut of vault yield; liquidity_fee = protocol liquidity fee. Never blend rates across types. NULL when fee_rate is NULL."
        },
        "utilization_status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "observed",
            "not_applicable",
            "unavailable",
            null
          ],
          "description": "Observation status of utilization (PHI-132): observed = fetched this cycle; not_applicable = the field does not apply (e.g. borrowing disabled — the value is cleared); unavailable = a temporary fetch gap (the last value is preserved). NULL on rows written before the status model."
        },
        "borrow_apr_status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "observed",
            "not_applicable",
            "unavailable",
            null
          ],
          "description": "Observation status of borrow_apr (see utilization_status)."
        },
        "fee_status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "observed",
            "not_applicable",
            "unavailable",
            null
          ],
          "description": "Observation status of fee_rate/fee_type (see utilization_status)."
        },
        "active_loans_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Derived (not stored): utilization × tvl_usd — active loan size from one stored column. NULL-propagating (NULL when utilization is NULL)."
        },
        "available_liquidity_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Estimated immediately available lending liquidity in USD, derived as tvl_usd × (1 − utilization), with utilization clamped to [0,1]. NULL when utilization is not observed or not applicable. This is a point-in-time estimate, not guaranteed executable withdrawal capacity; protocol queues, pauses, gates, and market movements can still constrain exits."
        },
        "liquidity_deficit_usd": {
          "type": [
            "number",
            "null"
          ],
          "description": "Estimated lending-liquidity deficit in USD, derived as max(0, tvl_usd × (utilization − 1)). Zero for known markets at or below 100% utilization; positive above 100%. NULL only when TVL or utilization is unknown or inapplicable."
        },
        "liquidity_status": {
          "type": "string",
          "enum": [
            "available",
            "exhausted",
            "deficit",
            "unknown"
          ],
          "description": "Interpretation of the liquidity metrics: available = positive available liquidity; exhausted = known market at zero available liquidity without over-utilization; deficit = raw utilization exceeds 100%; unknown = TVL or utilization is unavailable or inapplicable. Deficit indicates distress but does not by itself prove realized bad debt."
        },
        "real_yield_share": {
          "type": [
            "number",
            "null"
          ],
          "description": "Derived (not stored): share of net APY that is real interest vs emissions — LEAST(1, GREATEST(0, base_apr / apr_net)) when apr_net > 0.0001 AND base_apr is present, else NULL (the guard falls back to NULL, never 0). Clamped to [0,1]."
        },
        "gross_interest_apy": {
          "type": [
            "number",
            "null"
          ],
          "description": "Derived (not stored): operational pre-fee supply-interest proxy — borrow_apr × utilization. It is not an exact algebraic inverse of base_apr because protocol sources may publish borrow and supply rates on different APR/APY bases. Independent from borrow_status: observed existing debt can keep this value nonzero while new borrowing is paused, capped, or disabled, and a real observed zero remains zero. Money-market only; NULL for non-lending vaults or unavailable inputs."
        },
        "yield_quality_grade": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "A",
            "B",
            "C",
            "D",
            "F",
            null
          ],
          "description": "Published yield-quality grade from the 14d MEDIAN real-yield share (base_apr/apr_net per snapshot): A ≥0.9, B ≥0.75, C ≥0.5, D ≥0.25, F <0.25. NULL until ≥5 snapshots spanning ≥3 days have accrued (honest cold start — never backfilled or defaulted). The full diagnostics object (flags, medians, score effects) is on the vault detail endpoint as yield_quality."
        },
        "protocol_name": {
          "type": "string"
        },
        "protocol_logo": {
          "type": [
            "string",
            "null"
          ]
        },
        "curator_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "curator_logo": {
          "type": [
            "string",
            "null"
          ]
        },
        "chain_name": {
          "type": "string"
        },
        "chain_logo": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "id",
        "address",
        "protocol_id",
        "chain_id",
        "curator_id",
        "name",
        "symbol",
        "external_id",
        "asset_address",
        "asset_symbol",
        "tvl_usd",
        "apr_net",
        "apr_forward",
        "total_score",
        "risk_tier",
        "capped_by",
        "risk_vectors",
        "is_active",
        "is_shutdown",
        "is_depositable",
        "deposit_capacity_usd",
        "deposit_status",
        "withdraw_status",
        "freshness_seconds",
        "needs_risk_review",
        "last_synced_at",
        "created_at",
        "is_stablecoin",
        "is_lsd",
        "is_single_exposure",
        "has_impermanent_loss",
        "is_audited",
        "is_high_confidence",
        "strategy_type",
        "base_apr",
        "utilization",
        "borrow_apr",
        "borrow_rate_basis",
        "borrow_reward_apr",
        "borrow_apr_net",
        "borrow_incentive_status",
        "has_borrow_rewards",
        "borrow_status",
        "fee_rate",
        "fee_type",
        "utilization_status",
        "borrow_apr_status",
        "fee_status",
        "active_loans_usd",
        "available_liquidity_usd",
        "liquidity_deficit_usd",
        "liquidity_status",
        "real_yield_share",
        "gross_interest_apy",
        "yield_quality_grade",
        "protocol_name",
        "protocol_logo",
        "curator_name",
        "curator_logo",
        "chain_name",
        "chain_logo"
      ]
    },
    "VaultDetail": {
      "allOf": [
        {
          "$ref": "#/$defs/Vault"
        },
        {
          "type": "object",
          "properties": {
            "pendle_position": {
              "$ref": "#/$defs/PendlePositionView"
            },
            "borrow_rewards": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "side": {
                    "type": "string",
                    "enum": [
                      "borrow"
                    ]
                  },
                  "token_symbol": {
                    "type": "string"
                  },
                  "token_address": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "apr": {
                    "type": "number"
                  },
                  "reward_type": {
                    "type": "string",
                    "enum": [
                      "token_incentive",
                      "points",
                      "trading_fee",
                      "strategy"
                    ]
                  },
                  "source": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "enum": [
                      "merkl_api",
                      "morpho_blue_api",
                      "protocol_api",
                      "onchain",
                      null
                    ]
                  },
                  "campaign_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "campaign_onchain_id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "distribution_type": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "source_url": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "start_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "end_at": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "side",
                  "token_symbol",
                  "token_address",
                  "apr",
                  "reward_type",
                  "source",
                  "campaign_id",
                  "campaign_onchain_id",
                  "distribution_type",
                  "source_url",
                  "start_at",
                  "end_at"
                ]
              },
              "description": "Itemized borrower-incentive evidence. When borrow_incentive_status is unavailable, rows are retained from the last successful observation for provenance only and are not current rebate quotes."
            },
            "protocol_version": {
              "type": [
                "string",
                "null"
              ]
            },
            "protocol_website": {
              "type": [
                "string",
                "null"
              ]
            },
            "protocol_created_at": {
              "type": [
                "string",
                "null"
              ]
            },
            "curator_one_liner": {
              "type": [
                "string",
                "null"
              ]
            },
            "is_source_verified": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "deployment_timestamp": {
              "type": [
                "string",
                "null"
              ]
            },
            "risk_score": {
              "type": [
                "number",
                "null"
              ]
            },
            "yield_quality": {
              "$ref": "#/$defs/YieldQuality"
            },
            "audit_status": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "Audited",
                "Partial",
                "Pending",
                "Unaudited",
                null
              ]
            },
            "auditors": {
              "type": [
                "array",
                "null"
              ],
              "items": {
                "type": "string"
              }
            },
            "audit_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "audit_report_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "is_immutable": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "timelock_seconds": {
              "type": [
                "number",
                "null"
              ]
            },
            "protocol_launch_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "protocol_auditors": {
              "type": [
                "array",
                "null"
              ],
              "items": {
                "type": "string"
              }
            },
            "protocol_security_page_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "protocol_bug_bounty_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "version_display_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "version_launch_date": {
              "type": [
                "string",
                "null"
              ]
            },
            "version_auditors": {
              "type": [
                "array",
                "null"
              ],
              "items": {
                "type": "string"
              }
            },
            "version_audit_report_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "version_security_page_url": {
              "type": [
                "string",
                "null"
              ]
            },
            "version_audit_history": {
              "type": [
                "array",
                "null"
              ],
              "items": {
                "$ref": "#/$defs/AuditEngagement"
              },
              "description": "Per-engagement audit records for this protocol version. Coverage fields (scope, unaudited_surface, findings) are present only where the report states them — an absent field means UNKNOWN, never \"fully covered\". Audit quality feeds the platform vector via auditor bands; coverage fields are disclosure only."
            },
            "declared_strategy": {
              "type": [
                "string",
                "null"
              ],
              "description": "What the curator or protocol publicly declares this vault does, quoted or faithfully summarized from the cited source. Disclosure only — never scored. NULL means no declaration has been recorded, which is itself signal."
            },
            "declared_strategy_source_url": {
              "type": [
                "string",
                "null"
              ],
              "description": "Where the declaration was published. Always present when declared_strategy is."
            },
            "declared_strategy_declared_at": {
              "type": [
                "string",
                "null"
              ],
              "description": "When the curator declared it (per the source), not when Philidor recorded it."
            }
          },
          "required": [
            "borrow_rewards",
            "protocol_version",
            "protocol_website",
            "protocol_created_at",
            "curator_one_liner",
            "is_source_verified",
            "deployment_timestamp",
            "risk_score",
            "yield_quality",
            "audit_status",
            "auditors",
            "audit_date",
            "audit_report_url",
            "is_immutable",
            "timelock_seconds",
            "protocol_launch_date",
            "protocol_auditors",
            "protocol_security_page_url",
            "protocol_bug_bounty_url",
            "version_display_name",
            "version_launch_date",
            "version_auditors",
            "version_audit_report_url",
            "version_security_page_url",
            "version_audit_history",
            "declared_strategy",
            "declared_strategy_source_url",
            "declared_strategy_declared_at"
          ]
        }
      ]
    },
    "VaultStrategyAssessment": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "observationKey": {
          "type": "string"
        },
        "observedAt": {
          "type": "string"
        },
        "sourceAsOf": {
          "type": [
            "string",
            "null"
          ]
        },
        "sourceProvider": {
          "type": "string"
        },
        "sourceUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "sourceRevision": {
          "type": [
            "string",
            "null"
          ]
        },
        "allocationKind": {
          "type": "string",
          "enum": [
            "capital_allocation",
            "managed_adapter_allocation"
          ]
        },
        "withinMandate": {
          "type": "boolean"
        },
        "breaches": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VaultStrategyBreach"
          }
        }
      },
      "required": [
        "observationKey",
        "observedAt",
        "sourceAsOf",
        "sourceProvider",
        "sourceUrl",
        "sourceRevision",
        "allocationKind",
        "withinMandate",
        "breaches"
      ]
    },
    "VaultStrategyBreach": {
      "type": "object",
      "properties": {
        "positionKey": {
          "type": [
            "string",
            "null"
          ]
        },
        "label": {
          "type": "string"
        },
        "kind": {
          "type": "string",
          "enum": [
            "below_minimum",
            "above_maximum",
            "unlisted_weight"
          ]
        },
        "observedWeight": {
          "type": "number"
        },
        "limitWeight": {
          "type": "number"
        },
        "deltaWeight": {
          "type": "number"
        }
      },
      "required": [
        "positionKey",
        "label",
        "kind",
        "observedWeight",
        "limitWeight",
        "deltaWeight"
      ]
    },
    "VaultStrategyConformance": {
      "type": "object",
      "properties": {
        "methodologyVersion": {
          "type": "string",
          "enum": [
            "strategy-conformance-v1.0.0"
          ]
        },
        "nonScoring": {
          "type": "boolean",
          "enum": [
            true
          ]
        },
        "availability": {
          "type": "string",
          "enum": [
            "available",
            "no_structured_mandate",
            "insufficient_history",
            "paused",
            "unavailable"
          ]
        },
        "status": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "within_mandate",
            "divergent",
            null
          ]
        },
        "decisionEligible": {
          "type": "boolean"
        },
        "evidenceContinuity": {
          "type": "string",
          "enum": [
            "continuous",
            "paused",
            "not_established"
          ]
        },
        "asOf": {
          "type": [
            "string",
            "null"
          ]
        },
        "pauseReason": {
          "type": [
            "string",
            "null"
          ]
        },
        "mandate": {
          "$ref": "#/$defs/VaultStrategyMandate"
        },
        "currentAssessment": {
          "$ref": "#/$defs/VaultStrategyAssessment"
        },
        "currentDivergence": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "firstObservedAt": {
              "type": "string"
            },
            "observedDurationSeconds": {
              "type": "integer",
              "minimum": 0
            },
            "startBoundedByHistory": {
              "type": "boolean"
            }
          },
          "required": [
            "firstObservedAt",
            "observedDurationSeconds",
            "startBoundedByHistory"
          ]
        },
        "latestReconvergence": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "divergenceFirstObservedAt": {
              "type": "string"
            },
            "reconvergedObservedAt": {
              "type": "string"
            },
            "observedDurationSeconds": {
              "type": "integer",
              "minimum": 0
            },
            "divergenceStartBoundedByHistory": {
              "type": "boolean"
            }
          },
          "required": [
            "divergenceFirstObservedAt",
            "reconvergedObservedAt",
            "observedDurationSeconds",
            "divergenceStartBoundedByHistory"
          ]
        }
      },
      "required": [
        "methodologyVersion",
        "nonScoring",
        "availability",
        "status",
        "decisionEligible",
        "evidenceContinuity",
        "asOf",
        "pauseReason",
        "mandate",
        "currentAssessment",
        "currentDivergence",
        "latestReconvergence"
      ]
    },
    "VaultStrategyMandate": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "vaultId": {
          "type": "string"
        },
        "mandateHash": {
          "type": "string"
        },
        "allocationKind": {
          "type": "string",
          "enum": [
            "capital_allocation",
            "managed_adapter_allocation"
          ]
        },
        "effectiveFrom": {
          "type": "string"
        },
        "sourceUrl": {
          "type": "string"
        },
        "sourceRevision": {
          "type": [
            "string",
            "null"
          ]
        },
        "positionBounds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/VaultStrategyPositionBound"
          }
        },
        "maxUnlistedWeight": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "methodologyVersion": {
          "type": "string",
          "enum": [
            "strategy-conformance-v1.0.0"
          ]
        },
        "createdAt": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "vaultId",
        "mandateHash",
        "allocationKind",
        "effectiveFrom",
        "sourceUrl",
        "sourceRevision",
        "positionBounds",
        "maxUnlistedWeight",
        "methodologyVersion",
        "createdAt"
      ]
    },
    "VaultStrategyPositionBound": {
      "type": "object",
      "properties": {
        "positionKey": {
          "type": "string"
        },
        "label": {
          "type": [
            "string",
            "null"
          ]
        },
        "minWeight": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        },
        "maxWeight": {
          "type": "number",
          "minimum": 0,
          "maximum": 1
        }
      },
      "required": [
        "positionKey",
        "label",
        "minWeight",
        "maxWeight"
      ]
    },
    "VaultStrategyTransparency": {
      "type": "object",
      "properties": {
        "declaration": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "text": {
              "type": "string"
            },
            "sourceUrl": {
              "type": [
                "string",
                "null"
              ]
            },
            "declaredAt": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "text",
            "sourceUrl",
            "declaredAt"
          ]
        },
        "wrapper": {
          "type": "object",
          "properties": {
            "status": {
              "type": "string",
              "enum": [
                "detected",
                "not_detected",
                "not_applicable",
                "evidence_unavailable"
              ]
            },
            "kind": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "share_token_wrapper",
                "allocation_pass_through",
                null
              ]
            },
            "target": {
              "$ref": "#/$defs/VaultWraps"
            },
            "basis": {
              "type": "string"
            },
            "allocationObservedAt": {
              "type": [
                "string",
                "null"
              ]
            },
            "limitations": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          "required": [
            "status",
            "kind",
            "target",
            "basis",
            "allocationObservedAt",
            "limitations"
          ]
        },
        "conformance": {
          "$ref": "#/$defs/VaultStrategyConformance"
        }
      },
      "required": [
        "declaration",
        "wrapper",
        "conformance"
      ],
      "description": "Non-scoring declared-strategy, wrapper/pass-through, and time-based allocation-conformance disclosure. Conformance remains null until a sourced structured mandate and continuous complete allocation evidence exist; partial or stale evidence pauses judgment."
    },
    "VaultWraps": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "vaultId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "protocolId": {
          "type": [
            "string",
            "null"
          ]
        },
        "chainId": {
          "type": "number"
        },
        "address": {
          "type": "string"
        },
        "riskScore": {
          "type": [
            "number",
            "null"
          ]
        },
        "riskTier": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "vaultId",
        "name",
        "protocolId",
        "chainId",
        "address",
        "riskScore",
        "riskTier"
      ],
      "description": "When set, this vault is a share-token wrapper around the referenced vault: its deposit asset is that vault's share token, so risk (and any score difference) passes through."
    },
    "YieldQuality": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "grade": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "A",
            "B",
            "C",
            "D",
            "F",
            null
          ],
          "description": "A-F from the 14d median real-yield share alone: A ≥0.9, B ≥0.75, C ≥0.5, D ≥0.25, F <0.25. NULL when unmeasurable."
        },
        "real_yield_share_14d": {
          "type": [
            "number",
            "null"
          ],
          "description": "14d MEDIAN of per-snapshot base_apr/apr_net (guard apr_net > 0.0001, clamped to [0,1]). NULL until ≥5 usable snapshots spanning ≥3 days."
        },
        "utilization_14d": {
          "type": [
            "number",
            "null"
          ],
          "description": "14d MEDIAN utilization. NULL until ≥5 utilization snapshots spanning ≥3 days (utilization history is young; this matures over days — honest cold start)."
        },
        "flags": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "reward_dependent",
              "idle_capital",
              "exit_liquidity_thin"
            ]
          },
          "description": "Median-smoothed 14d diagnostics: reward_dependent (median real-yield share <0.5 with apr_net ≥1% and TVL ≥$1M — more than half the advertised yield is emissions), idle_capital (median utilization <15% with TVL ≥$1M — vanity TVL; INFORMATIONAL ONLY, no score effect), exit_liquidity_thin (median utilization >95% — withdrawal-liquidity risk). Absent until enough history has accrued."
        },
        "score_effects": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "flag": {
                "type": "string",
                "enum": [
                  "reward_dependent",
                  "idle_capital",
                  "exit_liquidity_thin"
                ]
              },
              "vector": {
                "type": "string",
                "enum": [
                  "platform"
                ]
              },
              "cap": {
                "type": "number"
              },
              "penalty": {
                "type": "number"
              }
            },
            "required": [
              "flag",
              "vector"
            ]
          },
          "description": "Bounded platform-vector effects applied by the risk calculator (ratified methodology decision, 2026-07-12): per effect the platform score is first capped (min(score, cap)) then reduced by the bounded penalty (max(0, score − penalty)). Current calibration: exit_liquidity_thin → cap 8.0 + penalty 1.0; reward_dependent → cap 9.0 + penalty 0.5; idle_capital contributes NO score effect. Each applied effect is also explained in risk_vectors.platform.details.yieldQualityEffects."
        }
      },
      "required": [
        "grade",
        "real_yield_share_14d",
        "utilization_14d",
        "flags",
        "score_effects"
      ],
      "description": "Yield-quality diagnostics + published grade, written by the risk calculator from 14d of snapshot history. Flags are median-smoothed 14d diagnostics; exit_liquidity_thin and reward_dependent apply bounded platform-vector effects (cap 8.0 + penalty 1.0 / cap 9.0 + penalty 0.5); idle_capital is informational only. NULL until scored with the yield-quality-aware calculator or when no history exists."
    }
  }
}