{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/philidor-io/json-schema/philidor-io-vault-list-response-schema.json",
  "title": "VaultListResponse",
  "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/VaultListResponse",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Vault"
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "page": {
          "type": "number",
          "description": "The page parameter as received. Under offset paging (offset supplied) the offset takes precedence and meta.offset reports the row offset applied."
        },
        "limit": {
          "type": "number"
        },
        "total": {
          "type": "number"
        },
        "totalPages": {
          "type": "number"
        },
        "offset": {
          "type": "number",
          "description": "Present only when the request paged by offset: the row offset applied."
        }
      },
      "required": [
        "page",
        "limit",
        "total",
        "totalPages"
      ]
    }
  },
  "required": [
    "data",
    "meta"
  ],
  "$defs": {
    "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"
      ]
    }
  }
}