Files
proxmox/packages/economics-toolkit/config/strategy.schema.json
defiQUG dbd517b279 Sync workspace: config, docs, scripts, CI, operator rules, and submodule pointers.
- Update dbis_core, cross-chain-pmm-lps, explorer-monorepo, metamask-integration, pr-workspace/chains
- Omit embedded publish git dirs and empty placeholders from index

Made-with: Cursor
2026-04-12 06:12:20 -07:00

103 lines
4.0 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://proxmox.local/economics-toolkit/strategy.schema.json",
"title": "EconomicsStrategy",
"type": "object",
"required": ["version", "name", "baseNotionalUsdt", "aggregateMode", "legs"],
"properties": {
"version": { "const": 1 },
"name": { "type": "string" },
"baseNotionalUsdt": { "type": "number", "exclusiveMinimum": 0 },
"aggregateMode": { "enum": ["linear_pct_sum", "sequential_compound_usd"] },
"tags": { "type": "array", "items": { "type": "string" } },
"legs": {
"type": "array",
"items": {
"type": "object",
"required": ["id", "kind"],
"properties": {
"id": { "type": "string" },
"kind": { "type": "string" },
"grossPct": { "type": "number" },
"flashFeePct": { "type": "number" },
"flashNotionalMultiple": { "type": "number", "exclusiveMinimum": 0 },
"gasPctOfNotional": { "type": "number" },
"liquidityPct": { "type": "number" },
"minProfitPct": { "type": "number" },
"fixedCostUsdt": { "type": "number" },
"weight": { "type": "number", "exclusiveMinimum": 0 },
"notes": { "type": "string" },
"slippageBps": { "type": "number", "minimum": 0 },
"protocolFeeBps": { "type": "number", "minimum": 0 },
"mevDragBps": { "type": "number", "minimum": 0 },
"ilDragBps": { "type": "number", "minimum": 0 },
"liquidationCompetitionBps": { "type": "number", "minimum": 0 },
"derivedFrom": {
"type": "object",
"required": ["fromLegId", "field"],
"properties": {
"fromLegId": { "type": "string" },
"field": {
"enum": ["residualPct", "netAfterFlashPct", "grossEffectivePct", "bucketsTotalPct"]
},
"scale": { "type": "number" },
"offsetPct": { "type": "number" }
}
},
"derivedExpr": { "type": "object", "description": "Safe arithmetic tree; see toolkit docs" },
"exec": {
"oneOf": [
{
"type": "object",
"required": ["mode", "to", "data"],
"properties": {
"mode": { "const": "raw" },
"to": { "type": "string" },
"data": { "type": "string" },
"valueWei": { "type": "string" }
}
},
{
"type": "object",
"required": ["mode", "integrationTo", "pool", "tokenIn", "amountInWei", "minOutWei"],
"properties": {
"mode": { "const": "pmm_swap_exact_in" },
"integrationTo": { "type": "string" },
"pool": { "type": "string" },
"tokenIn": { "type": "string" },
"amountInWei": { "type": "string" },
"minOutWei": { "type": "string" }
}
}
]
},
"enrichPathCheck": {
"type": "object",
"required": ["poolAddress", "tokenIn", "amountInWei"],
"properties": {
"poolAddress": { "type": "string" },
"tokenIn": { "type": "string" },
"amountInWei": { "type": "string" },
"traderForView": { "type": "string" },
"decimals": { "type": "number" },
"flashFeePct": { "type": "number" },
"gasPctOfNotional": { "type": "number" },
"liquidityPct": { "type": "number" },
"minProfitPct": { "type": "number" }
}
},
"enrichGas": {
"type": "object",
"required": ["chainId", "gasUnits"],
"properties": {
"chainId": { "type": "integer" },
"gasUnits": { "type": ["string", "number"] },
"skipUsd": { "type": "boolean" }
}
}
}
}
}
}
}