{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "window": {
      "$ref": "uniswap-economic.schema.json#/properties/window"
    },
    "inventory": {
      "$ref": "uniswap-economic.schema.json#/properties/inventory"
    },
    "mode": {
      "const": "economic"
    },
    "execution": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "latency": {
          "$ref": "strategy.schema.json#/$defs/Duration"
        },
        "decision_interval": {
          "$ref": "strategy.schema.json#/$defs/Duration"
        },
        "models": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "swap_model": {
              "const": "prepared_integer_pool",
              "title": "Swap Model",
              "type": "string"
            },
            "liquidity_model": {
              "anyOf": [
                {
                  "const": "fixed_historical_fee_growth",
                  "description": "Exact historical fee growth of each fixed range, without dilution.",
                  "type": "string"
                },
                {
                  "const": "bracketed_historical_fee_growth",
                  "description": "Required for band allocations: credits the fee growth continuously initialized sampled ticks prove accrued inside each concrete range and reports the upper bracket.",
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Liquidity Model"
            }
          },
          "required": [
            "swap_model",
            "liquidity_model"
          ]
        }
      },
      "required": [
        "latency",
        "models"
      ]
    },
    "data": {
      "additionalProperties": false,
      "properties": {
        "sample_seconds": {
          "$ref": "strategy.schema.json#/$defs/Duration"
        },
        "max_age_seconds": {
          "$ref": "strategy.schema.json#/$defs/Duration"
        },
        "max_samples": {
          "exclusiveMinimum": 0,
          "minimum": 0,
          "title": "Max Samples",
          "type": "integer"
        },
        "max_bitmap_words": {
          "exclusiveMinimum": 0,
          "minimum": 0,
          "title": "Max Bitmap Words",
          "type": "integer"
        },
        "max_initialized_ticks": {
          "exclusiveMinimum": 0,
          "minimum": 0,
          "title": "Max Initialized Ticks",
          "type": "integer"
        },
        "coverage": {
          "items": {
            "$ref": "#/$defs/Coverage"
          },
          "minItems": 1,
          "title": "Coverage",
          "type": "array"
        },
        "source": {
          "const": "aerodrome_slipstream_archive",
          "title": "Source",
          "type": "string"
        },
        "max_liquidity_events": {
          "exclusiveMinimum": 0,
          "minimum": 0,
          "title": "Max Liquidity Events",
          "type": "integer"
        },
        "max_liquidity_log_requests": {
          "exclusiveMinimum": 0,
          "minimum": 0,
          "title": "Max Liquidity Log Requests",
          "type": "integer"
        }
      },
      "required": [
        "sample_seconds",
        "max_age_seconds",
        "max_samples",
        "max_bitmap_words",
        "max_initialized_ticks",
        "coverage",
        "source",
        "max_liquidity_events",
        "max_liquidity_log_requests"
      ],
      "title": "DataPolicy",
      "type": "object"
    },
    "costs": {
      "discriminator": {
        "mapping": {
          "excluded": "#/$defs/ExcludedCosts",
          "fixed_native": "#/$defs/Costs"
        },
        "propertyName": "kind"
      },
      "oneOf": [
        {
          "$ref": "#/$defs/ExcludedCosts"
        },
        {
          "$ref": "#/$defs/Costs"
        }
      ],
      "title": "Costs"
    }
  },
  "required": [
    "window",
    "inventory",
    "mode",
    "execution",
    "data",
    "costs"
  ],
  "$defs": {
    "Coverage": {
      "additionalProperties": false,
      "properties": {
        "allocation": {
          "minLength": 1,
          "pattern": "^\\S+$",
          "title": "Allocation",
          "type": "string"
        },
        "lower": {
          "maximum": 887272,
          "minimum": -887272,
          "title": "Lower",
          "type": "integer"
        },
        "upper": {
          "maximum": 887272,
          "minimum": -887272,
          "title": "Upper",
          "type": "integer"
        }
      },
      "required": [
        "allocation",
        "lower",
        "upper"
      ],
      "title": "Coverage",
      "type": "object"
    },
    "ExcludedCosts": {
      "additionalProperties": false,
      "properties": {
        "kind": {
          "const": "excluded",
          "title": "Kind",
          "type": "string"
        }
      },
      "required": [
        "kind"
      ],
      "title": "ExcludedCosts",
      "type": "object"
    },
    "Costs": {
      "additionalProperties": false,
      "properties": {
        "kind": {
          "const": "fixed_native",
          "title": "Kind",
          "type": "string"
        },
        "swap": {
          "minimum": 0,
          "title": "Swap",
          "type": "integer"
        },
        "mint": {
          "minimum": 0,
          "title": "Mint",
          "type": "integer"
        },
        "increase": {
          "minimum": 0,
          "title": "Increase",
          "type": "integer"
        },
        "decrease": {
          "minimum": 0,
          "title": "Decrease",
          "type": "integer"
        },
        "collect": {
          "minimum": 0,
          "title": "Collect",
          "type": "integer"
        },
        "close": {
          "minimum": 0,
          "title": "Close",
          "type": "integer"
        },
        "revoke": {
          "minimum": 0,
          "title": "Revoke",
          "type": "integer"
        }
      },
      "required": [
        "kind",
        "swap",
        "mint",
        "increase",
        "decrease",
        "collect",
        "close",
        "revoke"
      ],
      "title": "Costs",
      "type": "object"
    }
  }
}
