{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/atlasyield-club/json-schema/atlasyield-club-vault-route-schema.json",
  "title": "VaultRoute",
  "description": "Round-trip route-survival verdict for one vault: send USDC in, take the position, sell it straight back, on the exact path the app itself executes. \"Can I get out at size, measured today\" — not a liquidity claim, a real quote. SAME-CHAIN ONLY: funding USDC sits on the vault's own chain. Nothing here describes bridging in from another chain (see `probe`).",
  "x-generated": "2026-11-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/atlasyield-club-openapi.json#/components/schemas/VaultRoute",
  "type": "object",
  "properties": {
    "vaultId": {
      "type": [
        "string",
        "null"
      ],
      "description": "Stable identifier: protocol:chainId:address. Null when unscreened."
    },
    "chainId": {
      "type": "integer"
    },
    "address": {
      "type": "string",
      "description": "The address that was asked for. Present only on the unscreened shape."
    },
    "tracked": {
      "type": "boolean",
      "description": "False when the vault's chain has no route probe. Route tracking covers EVM chains only, so a Solana vault is not tracked. Not tracked is neither a pass nor a failure: there is simply no verdict."
    },
    "note": {
      "type": "string",
      "description": "Present only when `tracked` is false; says why there is no verdict."
    },
    "screened": {
      "type": "boolean",
      "description": "False when this vault has never been screened — no verdict is fabricated."
    },
    "verdict": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "OK",
        "DEGRADED",
        "DANGEROUS",
        "UNPRICEABLE",
        "NO_ROUTE",
        "SKIPPED",
        null
      ],
      "description": "OK/DEGRADED are tradable. DANGEROUS, UNPRICEABLE and NO_ROUTE block deposits in the live engine. SKIPPED means our own probe was rate-limited, not a statement about the vault. Null when unscreened."
    },
    "reasonClass": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "protocol_refused",
        "no_aggregator_quote",
        "dust",
        "no_amount",
        "rate_limited",
        "unmapped",
        null
      ],
      "description": "Why a non-OK verdict was reached. `protocol_refused`: the protocol's own router (Pendle Convert) refuses the position — the vault is dead for entry or exit. `no_aggregator_quote`: no same-chain aggregator quotes USDC into the underlying (typical for LP-token vaults); the vault may still be exitable by redeeming and unwinding by hand. `dust`: value came back but below the 85% floor. Null for OK/DEGRADED."
    },
    "usdIn": {
      "type": [
        "number",
        "null"
      ],
      "description": "USDC sent on the worst probed notional."
    },
    "usdOut": {
      "type": [
        "number",
        "null"
      ],
      "description": "USDC that came back after entering and exiting the position."
    },
    "retained": {
      "type": [
        "number",
        "null"
      ],
      "description": "usdOut / usdIn on the worst probed notional."
    },
    "path": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "pendle",
        "composer",
        "native",
        null
      ],
      "description": "Which execution path was probed — the same one the app itself calls."
    },
    "probe": {
      "type": "object",
      "description": "What was measured, stated on every response. `scope` is always `same-chain`; `crossChain` is always `not probed`.",
      "properties": {
        "scope": {
          "type": "string"
        },
        "funding": {
          "type": "string"
        },
        "legs": {
          "type": "string"
        },
        "notionalsUsd": {
          "type": "array",
          "items": {
            "type": "number"
          }
        },
        "router": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "crossChain": {
          "type": "string"
        }
      }
    },
    "checkedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When this verdict was last measured. Null when unscreened."
    },
    "cost": {
      "$ref": "#/$defs/RouteCost"
    }
  },
  "$defs": {
    "RouteCost": {
      "type": [
        "object",
        "null"
      ],
      "description": "Estimated round-trip execution cost at `notionalUsd`, same-chain, on the named router. fixedUsd = (vault entry + exit + swap + router approvals) gas × USD per gas; allInBps = fixedUsd / notional + proportional (router fee + price impact). An ESTIMATE at the stated gas basis: realised cost varies with gas at execution time. Null when the vault never completed a round trip. Unmeasured inputs are listed in `missing`; where a component is known to be missing, the figure is marked `floor: true` (a lower bound).",
      "properties": {
        "notionalUsd": {
          "type": "number"
        },
        "router": {
          "type": "string",
          "enum": [
            "lifi",
            "pendle-convert",
            "none"
          ],
          "description": "`none` = same token in and out, nothing swapped. Costs differ by router: the Atlas app deposits via Relay."
        },
        "gasBasis": {
          "type": "string",
          "enum": [
            "p50_7d"
          ],
          "description": "Headline basis. Trailing 7-day median",
          "so a single spike cannot set it.": null
        },
        "fixedUsd": {
          "type": "object",
          "properties": {
            "current": {
              "type": [
                "number",
                "null"
              ]
            },
            "p50_7d": {
              "type": [
                "number",
                "null"
              ]
            },
            "p90_7d": {
              "type": [
                "number",
                "null"
              ]
            },
            "floor": {
              "type": "boolean",
              "description": "True when a component is known to be missing (L1 data fee on L2s (Base, Optimism, Arbitrum), or router gas not reported): the true figure is higher."
            }
          }
        },
        "gasUnits": {
          "type": "object",
          "properties": {
            "swap": {
              "type": [
                "integer",
                "null"
              ]
            },
            "vaultEntry": {
              "type": "integer"
            },
            "vaultExit": {
              "type": "integer"
            },
            "approvals": {
              "type": "integer",
              "description": "USDC->router on entry + underlying->router on exit. LiFi only; 0 for Pendle Convert or a same-token round trip."
            },
            "total": {
              "type": "integer"
            },
            "vaultGasSource": {
              "type": "string",
              "enum": [
                "observed",
                "assumed"
              ],
              "description": "`observed` = median of real transactions; `assumed` = no transaction exists yet."
            },
            "highVariance": {
              "type": "boolean",
              "description": "True when the protocol's vault-action gas is a median of observed exits that disagreed by more than 2x."
            }
          }
        },
        "proportionalBps": {
          "type": "object",
          "properties": {
            "value": {
              "type": [
                "number",
                "null"
              ]
            },
            "routerFeeBps": {
              "type": [
                "number",
                "null"
              ]
            },
            "priceImpactBps": {
              "type": [
                "number",
                "null"
              ]
            },
            "extrapolated": {
              "type": "boolean",
              "description": "True outside the probed $100–$5,000: the nearest probe is held flat, not fitted."
            }
          }
        },
        "allInBps": {
          "type": "object",
          "properties": {
            "current": {
              "type": [
                "number",
                "null"
              ]
            },
            "p50_7d": {
              "type": [
                "number",
                "null"
              ]
            },
            "p90_7d": {
              "type": [
                "number",
                "null"
              ]
            },
            "floor": {
              "type": "boolean",
              "description": "Same as fixedUsd.floor. True means these figures are a LOWER BOUND; treat as not passed in any gate."
            }
          }
        },
        "missing": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "swap_gas",
              "l1_data_fee",
              "gas_current",
              "gas_history",
              "no_route_at_size",
              "gas_history_partial",
              "high_variance_gas"
            ]
          }
        }
      }
    }
  }
}