Solana prediction oracle via a proprietary engine.
Real-time analytics for on-chain & real-world events.
- What is M0Club?
- Core Principles
- What M0Club Produces
- System Overview
- Components
- Quickstart
- Build and Development
- API
- SDK Usage
- Operations
- Observability
- Security
- Contributing
- License
- Official Links
- Publishing Checklist
M0CORE is a next-generation omni-domain predictive oracle built on Solana.
Core idea: The world doesn't just happen. It's calculated.
M0CORE goes beyond price feeds. It models high-signal events across multiple domains and publishes:
- probability distributions
- confidence intervals
- integrity proofs (commit-reveal + bundle hashing)
- on-chain verifiable output bundles
Domains include:
- POLITICS — elections, geopolitical risk, governance outcomes
- SPORTS — elite leagues, odds dynamics, win-rate distributions
- MARKETS — macro indicators, cross-market regimes, crypto + tradfi interactions
- Integrity by Design: commit-reveal + signer sets + replay protection.
- Omni-Domain: same oracle interface for on-chain markets and real-world events.
- Quantified Uncertainty: confidence intervals and calibrated probabilities, not vague signals.
- Deterministic Outputs: canonical normalization + bundle hashing for reproducibility.
- Operational Readiness: deployable with docker-compose for local dev and Kubernetes for production.
M0CORE produces Oracle Output Bundles that are:
- content-addressed (hash)
- optionally Merkleized (for partial verification)
- signed by the active signer set
- posted on-chain with epoch metadata and anti-replay constraints
See: docs/protocol-spec/oracle-output-format.md
Example output shape (conceptual):
{
"market_id": "SPORTS_NBA_LAL_BOS",
"epoch_id": 1842,
"timestamp": 1730000000,
"outcomes": {
"LAL": { "p": 0.51, "ci": [0.48, 0.54] },
"BOS": { "p": 0.49, "ci": [0.46, 0.52] }
},
"bundle_hash": "0x...",
"signatures": ["..."]
}m0core/
.github/
config/
scripts/
programs/ # On-chain Anchor programs
core-engine/ # Engine monorepo (ingest/normalize/quant/bundle/signer/runtime)
services/ # api-gateway, indexer, realtime, dashboard, jobs
sdk/ # TS/Rust/Python SDKs + shared types
infra/ # docker, k8s/helm, terraform, monitoring
docs/ # specs, ops, architecture
tests/ # integration, load (k6), fuzz
High-level pipeline:
[ Connectors ] -> [ Normalization ] -> [ Feature Store ] -> [ Models ] -> [ Calibration ]
| | | | |
v v v v v
raw events canonical events feature vectors distributions confidence intervals
\___________________________________________________________________________________/
|
v
[ Bundle + Hash ]
|
v
[ Sign + Submit ]
|
v
[ On-chain Oracle Program ]
Engine spec references:
docs/engine-spec/data-ingestion.mddocs/engine-spec/normalization.mddocs/engine-spec/feature-store.mddocs/engine-spec/models-bayes.mddocs/engine-spec/calibration.mddocs/engine-spec/confidence-intervals.mddocs/engine-spec/bundle-hashing.mddocs/engine-spec/performance.md
The on-chain oracle supports a commit-reveal publication pattern:
- Commit: signers commit to a hash of payload + salt for an epoch
- Reveal: signers reveal payload + salt, validated against commits
- Finalize: protocol aggregates revealed payloads into a final bundle
Spec: docs/protocol-spec/commit-reveal.md
Signer sets provide the authority layer for publishing bundles and managing updates. Rotation is designed to be auditable and operationally safe.
Spec: docs/protocol-spec/signer-set.md
Ops: docs/ops/signer-rotation.md
Signed payloads and bundle submissions include replay protection to prevent reuse across epochs or markets.
Spec: docs/protocol-spec/replay-protection.md
Dispute resolution and slashing parameters are intended to deter manipulation and enforce signer behavior.
Specs:
docs/protocol-spec/dispute-resolution.mddocs/protocol-spec/slashing.md
Primary programs (Anchor):
programs/m0-oracle— core oracle protocol (epochs, commit-reveal, publish)programs/m0-registry— market registry + metadataprograms/m0-fee-router— fee routing primitivesprograms/m0-governance— timelock/governor scaffolding (optional)
Developer focus areas:
- deterministic account layouts
- explicit invariants
- strict input validation
- anti-front-running patterns
core-engine/ is a Rust workspace containing independent crates:
m0-ingestorconnectors (solana, sports, politics, macro, webhooks)m0-normalizercanonicalization and validationm0-feature-storefeature transforms + storage adaptersm0-quantmodels (elo/poisson/garch/hmm/ensemble) + bayes inference + scoringm0-anomalydrift/outlier/feed-integrity detectionm0-bundlebundle format + hashing + Merklem0-signerkeyring + commit/reveal + tx submission + replay protectionm0-corepipeline runtime and scheduling
Binaries:
m0dmain orchestrator daemonm0-ingestddedicated ingestion workerm0-backtestdbacktest runnerm0-signer-agentsigner agent for commits/reveals
services/ provides:
api-gatewayREST endpoints + OpenAPI + authrealtimewebsocket realtime feedsindexerreads program events and persists materialized viewsjobsmaintenance tasks (backfill/recompute/reconcile/cleanup)dashboardNext.js interface
sdk/ includes multi-language client libraries:
sdk/tsTypeScript SDKsdk/rustRust SDKsdk/pythonPython SDKsdk/typesshared types across languages
infra/ includes:
- docker-compose dev/staging/prod
- Kubernetes manifests + Helm chart scaffold
- Terraform scaffolding
- monitoring bootstrap (Prometheus/Grafana/Loki/alerts)
Minimum for local stack:
- Docker + Docker Compose
- Rust (pinned by
rust-toolchain.toml) - Node.js 20+ (dashboard + tests)
- Python 3.10+ (optional)
If building programs:
- Solana + Anchor toolchains (installed separately)
cd infra/docker
docker compose -f compose.dev.yml up --buildHealth:
curl -s http://localhost:8080/healthMarkets:
curl -s http://localhost:8080/markets | headIntegration tests:
cd tests
npm install
npm testOptional k6 smoke:
cd tests
npm run k6:smokeIf available:
./scripts/build_all.shManual builds:
Engine:
cd core-engine
cargo buildServices:
cd services
cargo buildRust SDK:
cd sdk/rust
cargo buildTypeScript SDK:
cd sdk/ts
npm install
npm run buildRust:
cargo fmt --all
cargo clippy --all-targets --all-features -- -D warningsTypeScript:
cd sdk/ts && npm run lint || true
cd tests && npm run lint || true
cd services/dashboard && npm run lint || trueAnchor IDLs are generated per-program:
./scripts/gen_idl.shShared types are maintained in sdk/types/ and should remain stable.
Config directory:
config/dev.tomlconfig/staging.tomlconfig/prod.toml
Domain catalogs:
config/markets/politics.tomlconfig/markets/sports.tomlconfig/markets/macro.tomlconfig/markets/crypto.toml
Risk + guardrails:
config/risk/thresholds.tomlconfig/risk/anomaly-rules.tomlconfig/risk/slashing-params.toml
Telemetry:
config/telemetry/otel.tomlconfig/telemetry/prometheus.yml
The gateway supports API key and JWT auth scaffolds (implementation may be configured per deployment):
- API keys:
M0_API_KEYSenv var (comma-separated) - JWT:
M0_JWT_SECRETenv var (optional)
Expected baseline endpoints (local dev):
GET /healthGET /marketsGET /epochsGET /predictions/:market_id/latestGET /metrics(optional Prometheus)
The OpenAPI spec is generated from services/api-gateway/src/openapi/spec.rs.
When enabled, it is typically exposed at:
/openapi.json(implementation-dependent)
cd sdk/ts
npm install
npm run buildExample (conceptual):
import { M0Client } from "@m0club/sdk";
const client = new M0Client({ baseUrl: "http://localhost:8080" });
const markets = await client.markets.list();
const latest = await client.predictions.latest(markets[0].market_id);
console.log(latest);cd sdk/rust
cargo testcd sdk/python
python -m pip install -e .
pytest -qRead: docs/ops/key-management.md
Principles:
- separate keys per environment
- never commit key material
- prefer KMS/HSM for production
- enforce rotation and audit trails
Read: docs/ops/signer-rotation.md
Read: docs/ops/incident-response.md
Read: docs/ops/migrations.md
The stack supports:
- logs (structured via
tracing) - metrics (Prometheus)
- traces (OpenTelemetry, optional)
- dashboards (Grafana)
- alerts (Prometheus/Grafana rules)
See: infra/monitoring/ and config/telemetry/
- Report vulnerabilities to: [email protected]
- Policy:
SECURITY.md - Prefer coordinated disclosure.
- Never disclose sensitive details in public issues.
See: CONTRIBUTING.md
Code of Conduct: CODE_OF_CONDUCT.md
Apache 2.0 — see LICENSE.md.
- Website: https://m0core.org/
- X: https://x.com/M0CORELAB
