Skip to content

About

Chainlink CRE ⇄ Predge — Chainlink for the fetch, Predge for the commit. CRE workflow fetches an outcome, the DON signs it, PredgeCREReceiver commits it as a slashable verdict.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

predge-cre — Chainlink CRE ⇄ Predge integration

Chainlink for the fetch. Predge for the commit.

A Chainlink Runtime Environment (CRE) workflow fetches an outcome off-chain; the DON signs it into a report; Predge turns that report into a committed, counterparty-verifiable verdict — tied to a request that was published on-chain before the outcome was knowable, with a slashable bond behind it, and (on Rootstock) anchored to Bitcoin. CRE and Predge are complementary primitives: the fetch layer and the commit layer.

  off-chain          Chainlink CRE (DON)              on-chain
  ┌────────┐   fetch  ┌───────────────┐  signed report  ┌────────────────────┐   commit   ┌──────────────────────┐
  │ outcome │────────▶│ CRE workflow  │────────────────▶│ KeystoneForwarder  │──onReport─▶│ PredgeCREReceiver    │
  │  / API  │  http   │ (main.ts)     │  writeReport    └────────────────────┘           │  → PredgeValidator   │
  └────────┘         └───────────────┘                                                   │  (commit + slash)    │
                                                                                          └──────────────────────┘

Why this exists

CRE answers "what is the value?" — it fetches and computes, and the output is "the oracle reported X." It does not answer "was this committed before the outcome, by a party that staked capital on being right, in a way nobody can silently rewrite?" — that is Predge. A prediction market or agent-settlement contract can take prices from Chainlink and outcomes from Predge without either duplicating the other's work.

What's in here

Piece Status
contracts/PredgeCREReceiver.sol ✅ on-chain bridge — accepts a CRE report via the Keystone onReport(bytes,bytes) standard, verifies the forwarder, decodes (requestHash, score, responseHash), and commits it into a Predge validator (validationResponse).
workflows/settlement/main.ts ⏳ CRE workflow — scaffolded via cre init once authenticated (see below), so the SDK version matches the CLI (1.30.x). Fetches an outcome (http.Client), encodes it, runtime.report(...), evmClient.writeReport(...) → PredgeCREReceiver.

The Predge validator (PredgeAgentValidator) is already live on Circle Arc and Rootstock testnets — see predge-arc and predge-rootstock. This repo wires CRE to it.

Three deliverables, one core

Built as one core CRE→Predge workflow, then forked per Chainlink track / grant angle:

  1. Core — CRE→Predge settlement. CRE fetches an outcome → Predge commits the verdict, bond slashable against a deterministic acceptance test. → Chainlink Integration / Community grant.
  2. Fork A — Prediction market. CRE fetches a price → Predge resolves a commit-before-outcome call as Hit/Miss. → Prediction Markets track.
  3. Fork B — Agent settlement (x402). Agent pays via x402 → CRE verifies delivery data → Predge commits the verdict. → Autonomous Agents track.

Forks A/B are a few lines over the core with different data sources.

Build / run (once authenticated)

CRE tooling requires a Chainlink account. Auth once, then scaffold + simulate:

# 1. Authenticate the CRE CLI (use a Predge-associated Chainlink account).
cre login                     # ~/.cre/bin/cre — installer added it to PATH

# 2. Scaffold the TypeScript workflow (pins the correct SDK version).
cre init --project-name predge-cre --template helloworld-typescript \
         --workflow-name settlement

# 3. Deploy PredgeCREReceiver, point the workflow config at its address,
#    fund the CRE key with Sepolia ETH (faucets.chain.link), then simulate.
cre workflow simulate settlement --target staging-settings

Local simulation runs against Sepolia; production deployment to a DON needs CRE Early Access (cre account access / app.chain.link/cre/request-access) — requested in parallel.

Toolchain

  • cre CLI ≥ 1.30 · Bun ≥ 1.2.21 · Node 20 · (Go ≥ 1.25 for Go workflows)
  • @chainlink/cre-sdk (installed via the cre init template so its version tracks the CLI)
  • Solidity ^0.8.24 for PredgeCREReceiver.sol (deploys as-is to Arc / Rootstock / Sepolia)

Status

  • ✅ PredgeCREReceiver.sol written — the on-chain half, CLI-independent.
  • ✅ CRE CLI installed, toolchain verified, SDK model mapped (trigger → http fetch → report → writeReport).
  • ⏳ Workflow main.ts — pending cre login (Chainlink account) for a version-correct cre init scaffold.

Support the work

Predge is independent and self-funded. If it's useful, you can back development directly — any chain works:

Chain Address
EVM (ETH / Arc / Rootstock / Robinhood / Base) 0x9084f5000E07C7133D6dA5eE4f271AB6D1821144
Bitcoin bc1q50nqg5lxkac9mwqdnj6lt0369mg8snkfam0e3p
Solana 9dxMRRtC7RKZH5rFZpUywjmnQ87H9qHhtW43u5LYmpV
TRON (TRX / USDT-TRC20) TVeWNcGwisQaL5Ge5B3GHG4tN5xX5VGxuU

More at data.predge.io/settlement.

About

Chainlink CRE ⇄ Predge — Chainlink for the fetch, Predge for the commit. CRE workflow fetches an outcome, the DON signs it, PredgeCREReceiver commits it as a slashable verdict.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages