hackquest logo
  • 学习
  • 课程探索
  • 实战
  • 探索黑客松
  • 往期项目
  • 社区
  • 论坛
  • 全球活动
  • 我的社区
  • 共学营
  • 组织中心
  • 更多
    • 词汇表
    • 博客
    • 水龙头
    • 工作机会
    • 媒体工具包
    • 创始人
hackquest logo

VeriSignal

A decentralized Bittensor subnet that turns short-horizon token and DeFi risk intelligence into a verifiable digital commodity. Competing miners produce calibrated 4-dimensional risk probabilities.

视频

技术栈

Python

描述

# VeriSignal: Checkpoint #1 Project Proposal

> Track: Bittensor Hackathon Track 1, Build a Subnet ($11,000 USDC pool).

> Target Checkpoint #1 Deadline: 2026-12-06 15:59 UTC.

> License: MIT (100% fresh original codebase).

---

## 1. Problem & Subnet Thesis

Autonomous trading agents, DeFi treasuries, and perpetual risk desks need calibrated, machine-readable probabilities of short-horizon market and protocol stress before liquidations, stablecoin depegs, or DEX liquidity drains occur. Today, risk signals are either siloed inside proprietary desks or emitted as uncalibrated heuristics with no skin in the game.

**VeriSignal** is a decentralized Bittensor subnet that turns short-horizon token and DeFi risk intelligence into a verifiable digital commodity. Competing miners produce calibrated 4-dimensional risk probabilities over a 5-minute H = 300s) horizon across major perpetuals and pegged assets BTC-PERP, ETH-PERP, SOL-PERP, USDC-USD, USDT-USD, stETH-ETH):

1. volatility_spike_prob: probability of a short-horizon realized volatility regime jump.

2. depeg_or_drawdown_prob: probability of stablecoin/LST peg divergence or sharp tail drawdown.

3. liquidity_stress_score: probability/severity of DEX depth thinning and TVL outflow stress.

4. funding_dislocation_prob: probability of perpetual funding-rate dislocation.

### Differentiation from Existing Subnets

- Unlike **Synth (SN50)**, which focuses on continuous asset price-path simulation, VeriSignal scores multi-factor DeFi protocol, stablecoin/LST depeg, DEX liquidity-drain, and funding dislocation probabilities packaged as one-call agent risk consensus.

- Unlike **Vanta (SN8)**, which evaluates directional trading PnL, VeriSignal evaluates strictly proper probability calibration against objective public market and on-chain ground truth, outputting calibrated probabilities and p10 to p90 confidence bands directly to autonomous agents via REST and MCP.

---

## 2. System Architecture

Components: Public Market Feeds and On-Chain RPC (Binance, CoinGecko, DeFiLlama, Blockmachine SN19) feed a Deterministic Snapshot Oracle (SHA-256 Hashed), which feeds the VeriSignal Validator (Sr25519 Signed Queries). The validator sends POST /predict (RiskQuery) to three miners (Miner 1: EWMA Baseline; Miner 2: Volatility Regime; Miner 3: Multi-Factor Ensemble), each returning a Signed RiskPrediction. The Proper Scoring Engine (Brier + Log-Loss + Anti-Sybil) receives the scored forecasts and submits weights via SetWeights / CRv4 Timelock to the Subtensor Chain (Localnet / Testnet), and writes to a Consensus Snapshot Store, which serves a REST + MCP Agent Gateway (/v1/consensus, /mcp) used by Autonomous Trading & Treasury Agents and a Static Telemetry Dashboard.

---

## 3. Incentive Mechanism & Adversarial Game-Theory Summary (30% Rubric Weight)

VeriSignal's validator scoring engine scoring/proper_scoring.py) is designed around three properties: strictly proper calibration, originator-safe anti-Sybil/copycat discounting, and CRv4 commit-reveal weight protection.

### 3.1 Strictly Proper Component Losses & Baseline Normalization

For a miner forecast vector p in [0, 1]^D (D = 4|A| = 24 across 6 tracked assets) and delayed ground-truth target y in [0, 1]^D, with p clipped at epsilon = 10^-4:

L_Brier(p, y) = (1/D) sum_i (p_i - y_i)^2, and L_log(p, y) = -(1/D) sum_i ( y_i ln p_i + (1 - y_i) ln(1 - p_i) ).

Both losses are normalized against the uninformative baseline p_ref = (0.5, ..., 0.5) and the realized entropy floor L_log(y, y):

S_Brier(p, y) = max(0, 1 - L_Brier(p, y) / max(10^-6, L_Brier(0.5, y)))

S_log(p, y) = max(0, (L_log(0.5, y) - L_log(p, y)) / max(10^-6, L_log(0.5, y) - L_log(y, y)))

S_proper(p, y) = 0.6 S_Brier(p, y) + 0.4 S_log(p, y), in [0, 1].

**Properness Guarantee:** Because L_Brier(0.5, y) and L_log(0.5, y) - L_log(y, y) depend only on y and not on p, positive linear rescaling preserves Bayes optimality: the expected score is uniquely maximized at the true conditional probability p* = E[y], while an uninformative constant 0.5 miner receives S_proper = 0 identically across all regimes.

### 3.2 Timeliness & Originator-Safe Anti-Sybil Uniqueness

1. **Timeliness Multiplier T(l):** Full 1.0 credit up to 1500 ms, decaying linearly to 0.5 at the 4000 ms hard timeout. A miner that does not answer within the timeout is dropped and earns 0 weight.

2. **Pairwise Similarity:** sim(v_u, v_w) = 0.5(1 - (1/D)||v_u - v_w||_1) + 0.5 max(0, cos(v_u - 0.5, v_w - 0.5)).

3. **Originator Protection & Sybil Dilution:** At similarity threshold theta = 0.985 and simultaneity window 2.0 ms, let e_u count similar peers arriving more than 2.0 ms earlier than u, and s_u count simultaneous similar peers within 2.0 ms, with m_u = e_u + s_u:

U_u = 1.0 if m_u = 0; otherwise U_u = (1 / (1 + m_u)^1.35) max(0.05, 1 - lambda min(1, e_u)), with lambda = 0.85.

- **Anti-Griefing:** An honest originator submitting ahead of imitators has m_u = 0, so U_u = 1.0; late copycats cannot reduce an honest miner's score.

- **Sybil Dilution Bound:** A ring of k >= 2 simultaneous clones earns combined score k * k^-1.35 = k^-0.35 < 1 (0.7846 at k=2, 0.6156 at k=4, 0.4830 at k=8) while paying k times the registration burn.

- **Delayed Copycat Bound:** A late copier (e_u = 1, s_u = 0) receives U_copy = 2^-1.35 * (1 - 0.85) = 0.058844 (a 94.12% penalty before latency decay).

### 3.3 Commit-Reveal v4 & EMA Smoothing

Epoch raw score R_u = S_proper T(latency) U_u is smoothed with EMA (alpha = 0.30) and submitted via bt.SetWeights, which auto-routes to Subtensor CRv4 timelock encryption (commit_timelocked_mechanism_weights) against future drand quicknet beacons whenever commit_reveal_weights_enabled is active on-chain.

### 3.4 Week 1 Local Simulation and Localnet Evidence

These are local results. Gate 1 independent verification cleared on 2026-12-06: Ukwx0x re-ran the full test suite from a fresh copy of the repo (5/5 passed) and reproduced this simulation exactly.

- **25-Epoch Adversarial Simulation sim/adversarial.py, seed 20261128):**

- Honest specialist miners total **0.954513 (95.45%)** emission share (honest_ensemble = 0.371625, honest_regime = 0.346368, honest_baseline = 0.236520).

- All 6 adversarial miners combined total **0.045487 (4.55%)** (adv_lazy_constant = 0.0, adv_delayed_copier = 0.018339, 4-UID Sybil clone ring total = 0.027148).

- **Local Localnet Harness subtensor-localnet:testnet):** Subnet registered (netuid=2), validator and miner registered, miner axon served (ServeAxon), signed RiskQuery / RiskPrediction round executed, and 5/5 automated pytest tests passed in a local re-run on 2026-12-06.

- **Testnet Readiness:** Burner Testnet coldkey generated locally (5DPgMLxN59CRDK5PTWKB7dDV8CgP4r9cDUcM8tKrniKCKeKh). Live Testnet subnet registration lock cost verified at 1.000000000 test TAO (block 8,546,200, 660 / 1,024 slots used). This is a read-only chain query. No Testnet registration has been paid for or submitted.

---

## 4. Milestone Plan to Jan 10, 2027 (48h Buffer Before Jan 12 Lock)

| Window | Owner | Concrete Deliverables & Verification Gate |

| :--- | :--- | :--- |

| Nov 29 to Dec 5 (Week 1) | Tayo, Simi, Ukwx0x | Fresh MIT repo, localnet Docker bootstrap (subtensor-localnet:testnet), burner Testnet wallet, Checkpoint #1 proposal draft, and Testnet TAO request. Gate 1 (Dec 5): Ukwx0x verifies Checkpoint #1 package and Day 5 Testnet TAO go/pivot check. |

| Dec 6 (15:59 UTC) | Founder / Ukwx0x | Submit verified Checkpoint #1 Project Proposal on HackQuest, only after Gate 1 clears. If Gate 1 has not cleared, hold and escalate. |

| Dec 6 to Dec 20 (Weeks 2 to 3), held until Gate 1 clears | Tayo, Simi | Live public market feed oracle (Binance, CoinGecko, DeFiLlama) plus Blockmachine SN19 on-chain RPC, with replay snapshots; full delayed-horizon validator loop with live CRv4 weight submission; 3 reference + 3 adversarial miners with automated chart outputs; small Linux VPS provisioned; live Testnet NetUID registered and serving 24/7. Gate 2 (Dec 20): Ukwx0x verifies live Testnet NetUID, validator weight updates, and sim metrics. |

| Dec 22 (15:59 UTC) | Founder / Ukwx0x | Submit Checkpoint #2 Working Prototype on HackQuest. |

| Dec 21 to Jan 7 (Weeks 4 to 5) | Tayo, Simi | Productionize REST + MCP Agent Query Gateway with graceful fallback and rate limiting; deploy static Live Telemetry Dashboard (GitHub Pages or Vercel, $0); finalize Simi's GTM & Mainnet Economics pitch; complete 3-command Quickstart, judge-ready README.md, and 3-minute live demo script. |

| Jan 8 to Jan 10 (Week 6) | Tayo, Ukwx0x | Execute 72-hour continuous Testnet stability soak test; record live demo video (zero mocked flows); Gate 3 (Jan 9): Ukwx0x fresh-clone audit, secret/history scan, and Testnet NetUID live verification; early final submission on Jan 10 (48h before Jan 12 15:59 UTC lock). |

---

## 5. Standards Compliance and Submission Readiness

This section maps the draft to the Crew Bounty Standards. It is written for the Gate 1 reviewer. Items marked pending are not claimed as complete.

### 5.1 Exact Bittensor v11 Sponsor Tech Integration

| File | What it does | Bittensor surface used |

| :--- | :--- | :--- |

| subnet/chain.py | Chain bridge for metagraph reads, neuron discovery, axon serving, registration, and weight submission. | bt.SyncClient, bt.ServeAxon, bt.BurnedRegister, bt.SetWeights, bt.CommitWeights |

| subnet/protocol.py | Canonical RiskQuery and RiskPrediction schemas plus deterministic payload hashing and hotkey signing. | bittensor_wallet.Keypair Sr25519 sign and verify |

| validator/main.py | Queries serving miners, verifies signatures, scores forecasts, writes consensus state, and can submit weights on chain. | compute_epoch_weights plus ChainBridge.submit_weights |

| miners/base.py | FastAPI axon server that validates the validator signature and returns a signed risk prediction. | bittensor_wallet.Wallet hotkey signing |

| gateway/app.py | Agent-facing REST routes (/v1/health, /v1/consensus, /v1/miners) and MCP JSON-RPC tools (get_risk_consensus, list_miner_scores). | None directly, reads validator consensus state |

| scripts/bootstrap_localnet.py | Boots wallets, funds dev accounts, registers the subnet and neurons, and serves a miner axon against the Docker localnet. | bt.SyncClient and localnet extrinsics |

| sim/adversarial.py | Reproducible 25-epoch adversarial simulation over the scoring engine. | None, local replay |

The deployed weight path uses bt.SetWeights, which routes to Subtensor CRv4 timelock encryption when commit_reveal_weights_enabled is active on chain. The code also exposes force_commit_reveal for an explicit bt.CommitWeights path.

### 5.2 Three-Command Local Quickstart

./scripts/localnet_up.sh

PYTHONPATH=. .venv/bin/python scripts/bootstrap_localnet.py

.venv/bin/pytest -v

- localnet_up.sh starts the ghcr.io/raofoundation/subtensor-localnet:testnet Docker image and waits for a healthy chain.

- bootstrap_localnet.py creates local wallets, funds them from the dev account, registers the subnet and neurons, and serves a miner axon against the localnet.

- pytest -v runs the signed protocol, proper scoring, adversarial simulation, and end-to-end REST and MCP tests.

### 5.3 Known Limitations

- **Local evidence only:** The current test and simulation results come from a deterministic replay oracle and the Docker localnet. A live Testnet NetUID is not yet registered. That is Week 2 to Week 3 work and it is held until Gate 1 clears.

- **Replay oracle first:** validator/oracle.py builds deterministic replay snapshots for testing. Live Binance, CoinGecko, DeFiLlama, and Blockmachine RPC ingestion is planned for Week 2 to Week 3.

- **CPU reference miners:** The three reference miners are lightweight statistical heuristics, not trained ML models. Their calibration will be measured on live data after the feed oracle is live.

- **Gateway hardening:** The gateway reads a local consensus state file. Authentication, rate limiting, caching, and graceful fallback are Week 4 to Week 5 work.

- **No independent security audit yet:** Gate 3 covers a fresh clone audit, a secret and history scan, and live Testnet verification. Nothing here replaces that gate.

- **Simulation scope:** The 25-epoch adversarial simulation is a local check of the scoring engine against lazy, delayed copier, and Sybil clone strategies. It is not a live emission result.

### 5.4 Cost, Wallet, and Spend Guardrails

- **Entry cost:** HackQuest entry is free. KYC and a payout wallet are required only after a win, not to register or submit.

- **Wallet isolation:** All Testnet work uses a dedicated burner Testnet coldkey. No main wallet, no founder funds, and no private key material is used or exposed.

- **Cash cap:** The scoped build budget is $0 to $55 expected, with a $75 hard cap. The main cash item is a small Linux VPS at about $18 to $36 for two months. Testnet TAO is requested from the Bittensor Discord faucet at $0.

- **Floor comparison:** The $0 to $55 cash range is 3.0% to 5.5% of the $1,000 lowest paid judged place, and 7.5% at the $75 cap. It is not compared only against first place.

- **This run:** $0 spent, no transactions, no submissions.

Note: the original uses LaTeX math notation for the formulas; if the HackQuest field renders plain text only, the plain-text rendering above is faithful. The architecture diagram in the original is a mermaid flowchart; Section 2 above describes it in text. If the form accepts markdown with mermaid, prefer the original file content, which will also be in the GitHub repo at docs/CHECKPOINT_1_SUBMISSION.md once the repo link arrives.

队长
UUkwa Zikora
项目链接
赛道
DeFiAI