Oracle Readiness

From mock mode toward a controlled live read

The oracle layer reads a verifiable ADA/USD reference. This page reviews the path from today's mock mode to a controlled live/preprod read — a price read only, never a fund movement.

Oracle read preview — not production settlement. The oracle reads a price reference and proof. No funds, swaps, custody, wallet signing, or settlement depend on it yet.

Mock mode today

Production runs in mock oracle mode: the app returns a static demo ADA/USD price and reports mock status. No on-chain read happens, and nothing depends on real funds. You can see the response at /api/oracle.

Live / preprod read path direction

In live mode, the app performs a read-only query of the Charli3 ADA/USD feed on preprod. It reads a price; it moves nothing.

Kupo: read path

Kupo indexes the chain and exposes a read-only REST API to query the oracle UTxO and its datum. No writes, no transactions.

Charli3: reference & proof

Charli3 provides a verifiable ADA/USD reference price and on-chain proof. It never executes swaps or moves funds.

Decode & extract

The most recent UTxO's Plutus CBOR datum is decoded, and the price and timestamp are extracted.

Graceful fallback

Any failure falls back to mock data with an explicit reason and a fallback status — never a bogus price.

Read-only, always

The worst case of a misconfiguration is a fallback to mock — never a fund movement.

Live read ≠ live settlement

A live price read does not enable contributions, custody, swaps, or settlement. Those stay off.

What must be true before production settlement

  1. 1

    Env reviewed — the required vars set on the server only, no secrets committed.

  2. 2

    Live endpoint confirmed — Kupo reachable and the Charli3 preprod UTxO resolvable.

  3. 3

    Oracle result manually checked — /api/oracle returns a sane live price.

  4. 4

    No real funds enabled — a live read enables no contributions, custody, or settlement.

  5. 5

    Status wording updated only after the read is verified and explicitly approved.

Failure and fallback cases

Each case falls back to mock data with an explicit reason rather than returning a misleading price.

Kupo unreachable or misconfigured
No oracle UTxO found at the address
Datum cannot be fetched or decoded
Datum decoded but price format unrecognized
Stale reading — old slot / timestamp