{"skill":{"slug":"skill-8","displayName":"Ganglion Synth City","summary":"Mine Bittensor Subnet 50 (Synth) with Ganglion. Covers price-path simulation, CRPS scoring, volatility estimation, backtesting, and multi-asset forecasting.","description":"---\nname: ganglion-synth-city\ndescription: \"Mine Bittensor Subnet 50 (Synth) with Ganglion.  Covers price-path simulation, CRPS scoring, volatility estimation, backtesting, and multi-asset forecasting.\"\nhomepage: https://github.com/TensorLink-AI/ganglion\nmetadata: {\"openclaw\": {\"emoji\": \"\\u26d3\", \"requires\": {\"anyBins\": [\"ganglion\", \"curl\"]}, \"always\": false}}\n---\n\n# Synth City — SN50 Mining Skill\n\nSynth (netuid 50) is a probabilistic price-forecasting subnet on Bittensor.\nMiners generate 1 000 Monte Carlo price paths per asset.  Validators score\nsubmissions using CRPS (Continuous Ranked Probability Score) across multiple\ntime increments.  Emissions split 50/50 between low-frequency (24 h) and\nhigh-frequency (1 h) competitions.\n\nThis skill provides SN50 domain knowledge.  Use the `ganglion` skill for\ngeneric Ganglion API commands.\n\nRepo: https://github.com/mode-network/synth-subnet/tree/main/synth\n\n## How SN50 works\n\n```\nValidator                              Miner\n─────────                              ─────\n1. SimulationInput ──────────────────► 2. Fetch live price (Pyth Hermes)\n   (asset, start_time,                    Generate 1 000 price paths\n    time_increment, time_length,\n    num_simulations=1000)\n                                       3. Return tuple:\n                                    ◄──── (timestamp, increment,\n                                           [path_1], …, [path_1000])\n\n4. Wait for horizon to elapse\n5. Fetch realised prices (Pyth Benchmarks)\n6. Compute CRPS per scoring interval (basis points)\n7. 90th-percentile cap → normalise (best=0) → asset coeff\n   → 10-day rolling avg (5-day half-life) → softmax → weights\n```\n\n## Competitions\n\n| | Low-frequency | High-frequency |\n|---|---|---|\n| Assets | BTC ETH SOL XAU SPYX NVDAX TSLAX AAPLX GOOGLX | BTC ETH SOL XAU |\n| Horizon | 24 h (86 400 s) | 1 h (3 600 s) |\n| Increment | 5 min (300 s) | 1 min (60 s) |\n| Points / path | 289 | 61 |\n| Paths | 1 000 | 1 000 |\n| Scoring intervals | 5 min, 30 min, 3 h, 24 h abs | 1 min → 60 min (18 intervals) |\n| Rolling window | 10 days (5-day half-life) | 3 days |\n| Softmax β | −0.1 | −0.2 |\n| Emission share | 50 % | 50 % |\n| Cycle time | 60 min | 12 min |\n\n## Submission format\n\n```python\n(\n    start_timestamp,          # int — unix seconds, must match request\n    time_increment,           # int — seconds, must match request\n    [p0, p1, …, pT],         # path 1 — T = time_length / time_increment + 1\n    [p0, p1, …, pT],         # path 2\n    …                        # 1 000 paths total\n)\n# Max 8 significant digits per price value.\n# Validation rejects: wrong timestamp, wrong increment, wrong path count,\n# wrong path length, non-numeric values, >8 digits.\n```\n\n## CRPS scoring pipeline\n\n1. Price changes computed in **basis points**: `(diff / price) × 10 000`\n2. Intervals ending in `_abs` use absolute prices normalised by `real_price[-1] × 10 000`\n3. Intervals ending in `_gap` use only the first two points in each chunk\n4. NaN gaps handled by `label_observed_blocks` — only consecutive non-NaN blocks scored\n5. `properscoring.crps_ensemble(real_value, simulated_ensemble)` per time step\n6. Total CRPS = sum across all intervals and time steps\n\nPost-CRPS normalisation:\n1. Cap at 90th percentile; invalid scores (-1) set to p90\n2. Shift so best miner = 0\n3. Multiply by per-asset coefficient\n4. 10-day rolling average with 5-day half-life exponential decay\n5. Softmax with negative β → lower CRPS = higher weight\n6. Sum low-freq + high-freq weights → `set_weights` on chain\n\n## Per-asset coefficients (weight normalisation)\n\n```\nBTC: 1.000   ETH: 0.672   SOL: 0.588   XAU: 2.262\nSPYX: 2.991  NVDAX: 1.389 TSLAX: 1.420 AAPLX: 1.865  GOOGLX: 1.431\n```\n\nXAU and equity coefficients are higher — improvements on those assets\nhave outsized impact on emissions.\n\n## Reference sigma values (hourly, GBM baseline)\n\n```\nBTC: 0.00472  ETH: 0.00695  SOL: 0.00782  XAU: 0.00208\nSPYX: 0.00156 NVDAX: 0.00342 TSLAX: 0.00332 AAPLX: 0.00250 GOOGLX: 0.00332\n```\n\nThese are from `synth/miner/simulations.py`.  Competitive miners should\nNOT use fixed sigma — estimate from recent data instead.\n\n## Price data sources\n\n| Source | Used by | URL | Resolution |\n|--------|---------|-----|------------|\n| Pyth Hermes | Miners (live price) | `https://hermes.pyth.network/v2/updates/price/latest` | Real-time |\n| Pyth Benchmarks | Validator (scoring) | `https://benchmarks.pyth.network/v1/shims/tradingview/history` | 1 min |\n\nBenchmarks symbols: `Crypto.BTC/USD`, `Crypto.ETH/USD`, `Crypto.SOL/USD`,\n`Crypto.XAUT/USD`, `Crypto.SPYX/USD`, `Crypto.NVDAX/USD`, `Crypto.TSLAX/USD`,\n`Crypto.AAPLX/USD`, `Crypto.GOOGLX/USD`\n\n## Tools in this project\n\n| Tool | Category | Purpose |\n|------|----------|---------|\n| `run_experiment` | training | Generate Monte Carlo paths.  Docstring contains full SN50 subnet reference. |\n| `fetch_price` | data | Live spot price from Pyth Hermes oracle |\n| `fetch_historical_prices` | data | Historical prices from Pyth Benchmarks (same source validator uses for CRPS scoring).  Returns timestamps, prices, returns in bps, gap info. |\n| `estimate_volatility` | training | Estimate sigma from recent returns (realized vol or EWMA) |\n| `score_paths` | evaluation | CRPS against realised prices (single window, quick check) |\n| `backtest` | evaluation | Full validator scoring pipeline replay: multi-interval CRPS at all SN50 scoring increments, per-asset coefficients, NaN handling, percentile normalisation.  Supports both low_freq and high_freq competitions. |\n\n## Search strategies\n\n1. Start with GBM + reference sigma as baseline — establishes a CRPS floor\n2. Use `fetch_historical_prices` to pull recent data, then `estimate_volatility` with EWMA\n3. `backtest` your paths against the historical window to get exact validator-equivalent CRPS\n4. Try GARCH(1,1) for volatility clustering — this is what CRPS rewards\n5. Add jump-diffusion (Merton) for sudden price moves GBM misses\n6. Regime-switching (bull/bear/sideways) for adaptive volatility\n7. Student-t or skewed-t innovations instead of normal (fat tails)\n8. Ensemble: blend paths from multiple models (e.g. 500 GBM + 500 jump)\n9. Calibrate per-asset: BTC and SOL need different models than XAU or SPYX\n10. Target high-coefficient assets first (XAU=2.262, SPYX=2.991) for max emission impact\n\n## Known pitfalls\n\n- Constant sigma fails during high-volatility regimes — CRPS will spike\n- Overfitting to recent action → narrow distributions that blow up on regime change\n- Too few paths (< 500) → noisy CRPS estimates; use 1 000 (the required amount)\n- Ignoring 24/7 BTC vol structure (weekends, overnight) degrades scores\n- Neural SDE training is unstable with < 90 days of minute-level data\n- Same distribution for BTC and ETH ignores different vol characteristics\n- Exceeding 8 significant digits per price value → validator rejects submission\n- Not matching start_timestamp or time_increment exactly → rejection\n\n## Bootstrap workflow\n\n```bash\n# Scaffold (if using ganglion init)\nganglion init ./synth-city --subnet sn50 --netuid 50\n\n# Or copy this example directory and run:\nexport GANGLION_PROJECT=./examples/synth-city\nganglion status $GANGLION_PROJECT\nganglion tools $GANGLION_PROJECT\nganglion run $GANGLION_PROJECT\n\n# Remote mode\nganglion serve ./examples/synth-city --bot-id alpha --port 8899\nexport GANGLION_URL=http://127.0.0.1:8899\n```\n\n## Example workflow (remote mode)\n\n```bash\n# 1. Fetch 48h of BTC history at 5-min intervals\ncurl -s -X POST \"$GANGLION_URL/v1/run/experiment\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"config\": {\"tool\": \"fetch_historical_prices\", \"asset\": \"BTC\", \"hours_back\": 48, \"time_increment\": 300}}' \\\n  | jq .data\n\n# 2. Run GBM baseline\ncurl -s -X POST \"$GANGLION_URL/v1/run/experiment\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"config\": {\"asset\": \"BTC\", \"model_type\": \"gbm\", \"num_simulations\": 1000}}' \\\n  | jq .data\n\n# 3. Backtest against the historical window\n# (pass realized_prices from step 1 into the backtest tool)\n\n# 4. Check knowledge for patterns\ncurl -s \"$GANGLION_URL/v1/knowledge?capability=simulate\" | jq .data\n```\n\n## Key dependencies\n\n- `numpy` — path generation, array ops\n- `properscoring` — CRPS calculation (`pip install properscoring`)\n- Pyth Hermes API — live prices\n- Pyth Benchmarks API — historical prices (same source as validator)\n","tags":{"latest":"0.1.2"},"stats":{"comments":0,"downloads":556,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":3},"createdAt":1772617273805,"updatedAt":1778491714733},"latestVersion":{"version":"0.1.2","createdAt":1772693337160,"changelog":"- Skill renamed to \"ganglion-synth-city\" with updated description, reflecting integration with Ganglion.\n- Documentation overhauled for clarity: covers SN50 mining, price-path simulation, CRPS scoring, volatility estimation, backtesting, and multi-asset forecasting on Bittensor Subnet 50.\n- Details on validator-miner workflow, submission formats, competition structure, scoring pipeline, and asset-specific parameters added.\n- New tables summarize competition parameters, per-asset coefficients, reference sigma values, and available tools.\n- Includes step-by-step example workflows for both local and remote (API) use cases.\n- Provides search strategies, known pitfalls, and bootstrap/project setup commands.","license":null},"metadata":{"setup":[],"os":null,"systems":null},"owner":{"handle":"tensorlink-dev","userId":"s1779k09srs2x10mha4aan1875884rwb","displayName":"tensorlink-dev","image":"https://avatars.githubusercontent.com/u/193437181?v=4"},"moderation":null}