143 lines
3.6 KiB
JSON
143 lines
3.6 KiB
JSON
{
|
||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||
"title": "ScenarioSpec",
|
||
"description": "Formal scenario input for reproducible, comparable sim runs. PRs that tweak k/fee can be tested against the same scenario file.",
|
||
"type": "object",
|
||
"required": [
|
||
"scenario",
|
||
"graphMode",
|
||
"topology",
|
||
"chainsIncluded",
|
||
"tokensIncluded",
|
||
"epochs"
|
||
],
|
||
"properties": {
|
||
"scenario": {
|
||
"type": "string",
|
||
"description": "Unique id, e.g. hub_only_11, full_quote_1_56_137, bridge_shock_137_56"
|
||
},
|
||
"graphMode": {
|
||
"type": "string",
|
||
"enum": [
|
||
"design",
|
||
"deployed"
|
||
],
|
||
"description": "design = topology + params only; deployed = deployment-status.json"
|
||
},
|
||
"topology": {
|
||
"type": "string",
|
||
"enum": [
|
||
"hub",
|
||
"full_quote",
|
||
"mixed"
|
||
],
|
||
"description": "hub = one PMM per cW vs hub per chain; full_quote = cW vs all anchors; mixed = hub on some chains, full_quote on others"
|
||
},
|
||
"chainsIncluded": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"description": "Chain IDs, e.g. [\"1\", \"56\", \"137\"]"
|
||
},
|
||
"tokensIncluded": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"description": "cW token symbols, e.g. [\"cWUSDT\", \"cWUSDC\"]"
|
||
},
|
||
"epochBlocks": {
|
||
"type": "integer",
|
||
"minimum": 1,
|
||
"description": "Blocks per epoch (optional; if absent, epoch is logical)"
|
||
},
|
||
"epochs": {
|
||
"type": "integer",
|
||
"minimum": 1,
|
||
"description": "Number of epochs to run"
|
||
},
|
||
"orderflowModel": {
|
||
"type": "object",
|
||
"description": "Distribution + volume ranges for synthetic trades",
|
||
"properties": {
|
||
"distribution": {
|
||
"type": "string",
|
||
"enum": [
|
||
"uniform",
|
||
"lognormal",
|
||
"pareto",
|
||
"poisson"
|
||
],
|
||
"default": "uniform"
|
||
},
|
||
"volumeMinUnits": {
|
||
"type": "number",
|
||
"minimum": 0
|
||
},
|
||
"volumeMaxUnits": {
|
||
"type": "number",
|
||
"minimum": 0
|
||
},
|
||
"tradesPerEpoch": {
|
||
"type": "integer",
|
||
"minimum": 0
|
||
},
|
||
"paretoAlpha": {
|
||
"type": "number",
|
||
"minimum": 0.5,
|
||
"description": "Pareto alpha (e.g. 1.5–2.5 for whale-heavy)"
|
||
}
|
||
}
|
||
},
|
||
"bridgeShock": {
|
||
"type": "object",
|
||
"description": "Optional bridge shock: from chain, to chain, magnitude, duration",
|
||
"properties": {
|
||
"fromChain": {
|
||
"type": "string"
|
||
},
|
||
"toChain": {
|
||
"type": "string"
|
||
},
|
||
"magnitudeFraction": {
|
||
"type": "number",
|
||
"minimum": 0,
|
||
"maximum": 1
|
||
},
|
||
"durationEpochs": {
|
||
"type": "integer",
|
||
"minimum": 1
|
||
}
|
||
}
|
||
},
|
||
"oracleModel": {
|
||
"type": "string",
|
||
"enum": [
|
||
"static",
|
||
"stochastic"
|
||
],
|
||
"default": "static"
|
||
},
|
||
"latencyModel": {
|
||
"type": "object",
|
||
"description": "Finality per bridge, rho(Delta t) params",
|
||
"properties": {
|
||
"finalityBlocksPerChainPair": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"rhoPerBlockBps": {
|
||
"type": "number",
|
||
"description": "Latency penalty per block in bps (piecewise linear)"
|
||
}
|
||
}
|
||
},
|
||
"seed": {
|
||
"type": "integer",
|
||
"description": "Optional RNG seed for deterministic runs; if omitted, derived from scenario name"
|
||
}
|
||
}
|
||
} |