{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Aave V4 debt position",
  "description": "A debt names its reserve, collateral and risk sources; how much to borrow is the strategy's decision.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "market",
    "account",
    "minimum_native_balance",
    "collateral",
    "minimum_health_factor",
    "oracle",
    "collateral_price_sources",
    "debt_price_source"
  ],
  "properties": {
    "market": {
      "$ref": "../strategy.schema.json#/$defs/Name"
    },
    "account": {
      "$ref": "../strategy.schema.json#/$defs/Name"
    },
    "minimum_native_balance": {
      "$ref": "../strategy.schema.json#/$defs/Quantity"
    },
    "hold_seconds": {
      "anyOf": [
        {
          "$ref": "../strategy.schema.json#/$defs/Duration"
        },
        {
          "type": "null"
        }
      ],
      "description": "Optional. Read only by strategy code for its own timed exit; connectors never act on it. Omit to hold until teardown."
    },
    "collateral": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "../strategy.schema.json#/$defs/Name"
      }
    },
    "minimum_health_factor": {
      "$ref": "../strategy.schema.json#/$defs/Quantity"
    },
    "oracle": {
      "$ref": "../strategy.schema.json#/$defs/Address"
    },
    "collateral_price_sources": {
      "type": "array",
      "items": {
        "$ref": "../strategy.schema.json#/$defs/Address"
      }
    },
    "debt_price_source": {
      "$ref": "../strategy.schema.json#/$defs/Address"
    }
  }
}
