123
MANTIS
sn123Markets & PredictionClean25Caution44No description set on the registered repo.
Barbariandev/MANTIS· pushed 3d ago reg. open
Emission
0.1
TAO / day · live
Alpha
0.0104
τ · mcap 20.8K
Top-slot payout
0.001
τ per winning epoch · live
Stars
19
live from the GitHub API
Primary language
Python
repo-reported
Last push
3d ago
feeds the dormancy integrity signal
Topics
—
repo-declared tags
About the repo
what the project says about itself — the input for semantic labels
No description set on the repo.
Reading this tab
scope of the data
Taonets fetches the repo's public metadata (description, topics, language, stars, last push) and the head of its README. Commit-count histories, contributor lists and release notes require the GitHub commits/releases endpoints, which the worker doesn't consume yet — those panels are coming with the ingest upgrade and are not simulated in the meantime.
README head
first lines of the default branch README, unedited
# MANTIS
Bittensor Subnet 123, The Ultimate Signal Machine
---
## Architecture
Validators sample miner payloads every `SAMPLE_EVERY` blocks, decrypt them after a timelock maturation window, and store (embedding, price) pairs in a SQLite database. Periodically, walk-forward scoring computes per-hotkey salience for each challenge, aggregates across challenges by weight, applies EMA smoothing, and sets on-chain weights.
```mermaid
graph TD
subgraph validator["validator.py"]
A["Sample block"] --> B["cycle.get_miner_payloads()"]
B --> C["ledger.append_step()"]
A --> D["Periodic weight calc"]
D --> E["ledger.iter_challenge_training_data()"]
E --> F["model.multi_salience()"]
F --> G["EMA smooth + set_weights()"]
end
subgraph ledger["ledger.py (SQLite)"]
H["challenge_data"]
I["raw_payloads"]
J["drand_cache"]
end
subgraph external["External"]
K["Miners (R2)"]
L["Drand beacon"]
M["Subtensor"]
N["price_service.py → R2"]
end
C --> H
C --> I
E -- reads --> H
B -- downloads --> K
I -- decrypt via --> L
G -- writes --> M
B -- reads commits --> M
N -- publishes --> H
```
---
## Challenges
All challenges are defined in `config.py` under `CHALLENGES`. Each specifies a `ticker`, `dim`, `blocks_ahead` (forward horizon in blocks at 12s/block), `loss_func` (scoring dispatch key), and `weight` (relative importance in final aggregation).
| Challenge | Ticker | dim | Horizon | loss_func | Weight | Description |
|---|---|---|---|---|---|---|
| ETH-1H-BINARY | `ETH` | 2 | 300 (1h) | `binary` | 1.0 | Binary direction prediction |
| CADUSD-1H-BINARY | `CADUSD` | 2 | 300 | `binary` | 0.5 | " |
| NZDUSD-1H-BINARY | `NZDUSD` | 2 | 300 | `binary` | 0.5 | " |
| CHFUSD-1H-BINARY | `CHFUSD` | 2 | 300 | `binary` | 1.0 | " |
| XAGUSD-1H-BINARY | `XAGUSD` | 2 | 300 | `binary` | 1.0 | " |
| ETH-HITFIRST | `ETHHITFIRST` | 3 | 500 | `hitfirst` | 1.25 | Barrier-hit direction |
| ETH-LBFGS | `ETHLBFGS` | 17 | 300 (1h) | `lbfgs` | 3.5 | Volatility regime + quantile paths |
| BTC-LBFGS-6H | `BTCLBFGS` | 17 | 1800 (6h) | `lbfgs` | 2.875 | " |
| MULTI-BREAKOUT | `MULTIBREAKOUT` | 2/asset | event | `range_breakout_multi` | 5.0 | Range breakout continuation/reversal (33 assets) |
| XSEC-RANK | `MULTIXSEC` | 1/asset | 1200 (4h) | `xsec_rank` | 3.0 | Cross-sectional return ranking (33 assets) |
| FUNDING-XSEC | `FUNDINGXSEC` | 1/asset | 2400 (8h) | `funding_xsec` | 4.0 | Cross-sectional funding rate ranking (20 assets) |
| FLOW-BTC | `FLOW` | 28 | horizon-driven, 1–336h | `flow` | 0.0 (7.875 = 25% at emission turn-on, 2026-09-14) | Capital-at-risk BTC bracket trades, evidence-gated payment |
TRADE-MIX is deprecated as of the FLOW launch (2026-08-17): off the
active roster, historical challenge data purged from validator
datalogs on open.
---
## Scoring
### Per-challenge scoring
Each `loss_func` has its own scoring path. All use L2 logistic regression and coefficient-based importance, but the structure differs.
**Binary** (`binary`) — Walk-forward with ElasticNet meta-model. Feature selection: per-miner L2 logistic on first half, AUC on second half, select top-$K$ (default 50). Meta-model: ElasticNet logistic (L1 ratio 0.5) on OOS base-model predictions across walk-forward segments. Importance = $|\beta_j|$. Segments weighted by recency.
**LBFGS** (`lbfgs`) — Two independent scoring paths blended 75/25:
- *Classifier path* (`compute_linear_salience`): per-class L2 logistic regressions on 5-bucket argmax predictions. Importance = $\beta_j^2$ summed across classes. Vectorized balanced accuracy evaluation. Uniqueness penalty suppresses miners with >85% argmax overlap with higher-ranked peers.
- *Q-path* (`compute_q_path_salience`): 12 independent binary L2 logistic models (one per tail-bucket / sigma-threshold combination). Importance = averaged $|\beta_j|$ across sub-models.
Both paths are individually top-$K$ renormalized with exponential rank decay before blending.
**HITFIRST** (`hitfirst`) — Two L2 logistic regressions on logit-transformed miner probabilities: one for up-barrier-hit ($y=1$ if price hits $+\sigma$ first), one for down-barrier-hit. Importance = $|\beta_j^{\text{up}}| + |\beta_j^{\text{down}}|$. No walk-forward — single fit on all valid samples.
**MULTI-BREAKOUT** (`range_breakout_multi`) — Operates on completed breakout events (not time series). Two-stage: (1) Empirical AUC gate — per-miner AUC on $P_{\text{continuation}}$ vs realized label, requiring AUC > 0.5 and ≥ 2 temporal episodes. (2) L2 logistic on z-scored miner predictions with episode-balanced sample weighting (each temporal episode gets equal total weight regardless of event count). Importance = $|\beta_j|$.
**XSEC-RANK** (`xsec_rank`) — Cross-sectional binary reformulation: label = 1 if asset's forward return exceeds the cross-sectional median. All assets pooled ($N_{\text{assets}} \times$ sample multiplier). Walk-forward meta-model: feature selection by per-miner univariate AUC, top-$K$ (default 20) selected, L2 logistic meta-model. Importance per segment:
$$
w_j = |\beta_j| \cdot \max\!\Big(\frac{\text{AUC}_{\text{meta}} - 0.5}{0.5},\; 0\Big)
$$
Segments aggregated with exponential recency weighting.
**FUNDING-XSEC** (`funding_xsec`) — Same structure as XSEC-RANK but on funding rate changes instead of price returns. Embargo = $\max(\text{LAG}, \text{ahead})$ with explicit `train_cutoff = val_start - ahead` to prevent label leakage from forward-looking labels. Stale miners (temporal std < $10^{-4}$ per asset column) zeroed before pooling.
**FLOW** (`flow`) — Not a regression challenge: miners submit bracket trades (direction, Kelly fraction, stop, two targets, horizon) across four horizon regimes, resolved against multi-venue klines. Per-trade R is path-penalized, tail-amplified, and Kelly-weighted into a per-regime EWMA, and payment is gated behind a significance statistic, t