Skip to main content

Chronos — Verifiable Delay Function (VDF)

Proof-of-elapsed-sequential-work for the AI agent economy. Chronos sells time you can verify: a Wesolowski VDF over an unfactored RSA-2048 modulus. Computing the output costs T sequential squarings that cannot be parallelized — but anyone can check the result in milliseconds with a single equation. No trust in the oracle, no shortcut for the prover.

tests coverage protocol license

Landing: oracles.modelmarket.dev · Ecosystem: ecosystem.modelmarket.dev · Oracle family: oracles Part of the alexar76 oracle family — built natively on oracle-core, discoverable via AIMarket Protocol v2 (signed manifest, priced invoke, signed receipts, measured metrics).

Documentation (EN / RU / ES): docs/en.md · docs/ru.md · docs/es.md


How it works

flowchart TB
  AGENT["Autonomous agent · service mesh"] -->|"discover · invoke · pay"| HUB["AIMarket Hub<br/>modelmarket.dev"]
  HUB -->|"signed, priced call"| CH["Chronos VDF oracle<br/>chronos.eval · chronos.verify"]

  subgraph eval["chronos.eval@v1 — the delay"]
    SEED["seed → g = H(seed) mod N"] --> SQ["y = g^(2^T) mod N<br/>T sequential squarings<br/>(non-parallelizable)"]
    SQ --> PRF["Wesolowski proof π, ℓ<br/>(Fiat-Shamir)"]
  end
  CH --> eval
  PRF -->|"y, π, ℓ, T"| ANYONE["Anyone"]
  ANYONE -->|"chronos.verify@v1<br/>π^ℓ · g^r ≡ y (mod N)"| OK["✓ valid in ~15 ms<br/>without redoing the work"]

  CH -. "wraps Platon's output → unbiasable beacon" .-> PLATON["Platon — verifiable randomness"]

The setup is trustless: N is the public RSA-2048 challenge modulus whose factorization is unknown to everyone, so nobody knows the group order — and without the order there is no way to shortcut 2^T exponentiations into a small number of multiplications. The squarings are the elapsed time.


Implementation & security parameters

Concrete, auditable details — everything below is in chronos/vdf.py:

Modulus N — obtained, not generated. N is the fixed, public RSA-2048 challenge number (RSA Factoring Challenge), hardcoded in vdf.py. It is never generated per request on purpose: whoever generates an RSA modulus knows its factors p,q — hence the group order — and could collapse g^(2^T) to g^(2^T mod φ(N)), destroying the delay. RSA Labs discarded this number's factors, so nobody knows the order → trustless, no dealer.

Evaluation (the delay). g = hash_to_group(seed) — SHA-256 expanded to 256 bytes, reduced mod N, floored to ≥ 2. Output y = g^(2^T) mod N from T strictly sequential squarings (y ← y² mod N, repeated T times) — inherently non-parallelizable. T = difficulty, clamped to [1, 1_000_000] (MAX_DIFFICULTY).

Wesolowski proof (non-interactive, Fiat–Shamir). ℓ = hash_to_prime(g,y,T) — a deterministic 128-bit prime from the transcript g|y|T (SHA-256 + counter, Miller–Rabin with deterministic small-base witnesses). π = g^(⌊2^T / ℓ⌋) mod N. Prover returns (y, π, ℓ, T).

Verification (~15 ms, no re-work).

  1. Recompute ℓ' = hash_to_prime(g,y,T); reject if ℓ' ≠ ℓ — binds the proof to the exact transcript, so a prover can't pick a friendly challenge.
  2. r = 2^T mod ℓ.
  3. Accept iff π^ℓ · g^r ≡ y (mod N) — two modular exponentiations, milliseconds.

Security levels (stated honestly).

  • Soundness ≈ 128-bit — Wesolowski, from the 128-bit challenge prime ℓ, under the adaptive-root assumption.
  • Hardness anchor ≈ 112-bit classical — RSA-2048's unknown-order/factoring assumption (NIST).
  • Sequentiality rests on the RSW time-lock assumption: no known parallel speed-up for repeated squaring in a group of unknown order.
  • Guards: g ≥ 2 (rejects trivial 0/1 inputs); MAX_DIFFICULTY bounds resource use; primality uses deterministic Miller–Rabin bases (sufficient for 128-bit candidates).
  • Quantum caveat: Shor factors N and breaks the assumption → class-group VDFs are the post-quantum successor. RSA-2048 is the standard classical hardness anchor for today.

The proof/verify round-trip is exercised end-to-end in tests/test_chronos.py (valid proofs verify; tampered y/π/ℓ/T and malformed inputs are rejected; the modulus is pinned to the canonical 2048-bit value).

Full setup transparency, threat model, and honest audit status → SECURITY.md. Chronos uses standard, unit-tested constructions but is not independently audited — see also crypto-maturity.en.md (family-wide honesty). For high-value money flows, get an external cryptographic review first.


AIMarket capabilities

ID What agents buy Price
chronos.eval@v1 Proof-of-elapsed-sequential-work — y = g^(2^T) mod N from T enforced sequential squarings, returned with a Wesolowski proof anyone can check $0.01
chronos.verify@v1 Trustless verification — confirm a VDF proof (π^ℓ · g^r ≡ y) in ~15 ms without redoing the delay $0.001

Every invoke returns a signed 7-field protocol receipt and a sha256 input_hash. p50_latency_ms / success_rate_30d in the manifest are surfaced by oracle-core.


Use cases (agent economy)

  • Unbiasable randomness beacon (Chronos × Platon). Draw entropy from platon.random@v1, then wrap it in chronos.eval@v1. Because changing the result would require re-running T enforced-sequential squarings, even the operator cannot grind the outcome. This closes Platon's last-mile trust gap and yields a publicly verifiable, bias-resistant beacon for lotteries, leader election, and fair sortition.
  • Fair ordering / anti-front-running. A mesh of agents submits actions; each is gated behind a VDF of difficulty T. No agent can compute its slot faster by buying more cores, so ordering is provably fair — useful for sealed-bid auctions and MEV-resistant queues.
  • Trustless timeouts & rate-limiting. Require a proof of T sequential squarings before an expensive action (mint, withdraw, escalate). The delay is enforced by math, not by a clock an attacker controls or a server an attacker can fake.
  • Proof of "I waited." An agent can prove to a counterparty that real wall-clock-equivalent sequential work elapsed between two events, with a receipt anyone can audit — no trusted timestamper.

Invoke (curl)

# Discover
curl -s http://localhost:9300/.well-known/ai-market.json | jq .
curl -s http://localhost:9300/ai-market/v2/manifest | jq '.tools[].capability_id'

# Evaluate the VDF — returns y + Wesolowski proof (π, ℓ)
curl -s -X POST http://localhost:9300/ai-market/v2/invoke \
  -H "Content-Type: application/json" \
  -d '{"capability_id":"chronos.eval@v1","input":{"seed":"agent-7","difficulty":50000}}'

# Verify a proof — feed the eval output straight back in
curl -s -X POST http://localhost:9300/ai-market/v2/invoke \
  -H "Content-Type: application/json" \
  -d '{"capability_id":"chronos.verify@v1","input":{"g":"...","y":"...","difficulty":50000,"proof":{"pi":"...","l":"..."}}}'

Run & test

# From the monorepo root (oracle-core already pip-installed in .venv)
PYTHONPATH=oracles/chronos .venv/bin/python -m pytest oracles/chronos/tests -q

# Serve
PYTHONPATH=oracles/chronos .venv/bin/python -m chronos.main   # → http://localhost:9300

Visual

A live, standalone cosmic visual — a single glowing helix of beads growing segment-by-segment, each bead one of the T sequential squarings. One thread, never a field: it looks non-parallelizable, because it is.

▶ Open frontend/index.html directly in any browser (no build step, no CDN).


License

MIT — alexar76 oracle family

Metadata

Release files for aimarket-oracle-chronos 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aimarket-oracle-chronos 0.1.0
File Size Uploaded Provenance Actions
aimarket_oracle_chronos-0.1.0.tar.gz 13.6 kB Without provenance Details for aimarket_oracle_chronos-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aimarket-oracle-chronos 0.1.0
File Interpreter ABI Platform Actions
aimarket_oracle_chronos-0.1.0-py3-none-any.whl Python 3 none any Details for aimarket_oracle_chronos-0.1.0-py3-none-any.whl

Total release size: 26.1 kB

Release files / aimarket_oracle_chronos-0.1.0.tar.gz

Download URL aimarket_oracle_chronos-0.1.0.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
284579ed1a97312d303dc2b228b7d3901b3040ae2dd8c7454bb6b44df63195eb
BLAKE2b-256 checksum
How to use checksums
ea0f38bafe2308f2fda448a62101199998b3feff73e96b2dfb41800e42c6e575
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / aimarket_oracle_chronos-0.1.0-py3-none-any.whl

Download URL aimarket_oracle_chronos-0.1.0-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bceb7a310e8419176a408a63659d671dc8a3c501d157f1c1ae1c2868041af706
BLAKE2b-256 checksum
How to use checksums
4068f6adf0bbe0cee5634407234574dd1c258cd4351248efd558ec5604e38ba4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for aimarket-oracle-chronos 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page