Skip to content

docs: add Conflux-maintained Pyth-compatible oracle; flag Pyth sunset - #985

Open
intrepidcanadian wants to merge 2 commits into
Conflux-Chain:mainfrom
intrepidcanadian:feat/oracle-pyth-sunset
Open

docs: add Conflux-maintained Pyth-compatible oracle; flag Pyth sunset#985
intrepidcanadian wants to merge 2 commits into
Conflux-Chain:mainfrom
intrepidcanadian:feat/oracle-pyth-sunset

Conversation

@intrepidcanadian

@intrepidcanadian intrepidcanadian commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

What

Pyth Network has announced it is shutting down Conflux eSpace support on July 31, 2026. This PR prepares the oracle docs:

  1. New page: Conflux Price Oracle (Pyth-Compatible) — documents the Conflux-maintained drop-in replacement (conflux-fans/oracle-contracts):
    • Mainnet proxy 0x5286BD91e2C79fE066926a15193C7e531bBF6750 and testnet proxy 0x838c40B3904FAfBc21b670c97b0dFeE7D8D0a016
    • Supported price feeds (BTC, ETH, USDT, USDC, CFX, BNB — same feed IDs as Pyth — plus AxCNH), all expo -8, ~1h update cadence
    • Migration guide from Pyth's pull model (no Hermes update flow, no update fee — read-only integration) with a Solidity consumer example and a cast liveness check
    • Trust/limitation notes: 1h cadence, role-based updaters, UUPS upgradeability
  2. Sunset warning on the existing Pyth tutorial linking to the migration page.

Verification

  • Confirmed on-chain that both proxies and their implementations have deployed code, and that the mainnet oracle serves a current CFX/USD price via getPriceUnsafe (queried during authoring).
  • Rendered locally with docusaurus start — both pages render, links resolve.

🤖 Generated with Claude Code


This change is Reviewable

Pyth Network is shutting down Conflux eSpace support on July 31, 2026.
Adds a new oracle page documenting the Conflux-maintained drop-in
replacement (conflux-fans/oracle-contracts): verified mainnet/testnet
proxy addresses, supported price feed IDs (same IDs as Pyth for major
assets), migration steps from Pyth's pull model, a consumer contract
example, and trust/limitation notes (1h cadence, role-based updaters,
UUPS upgradeability). Adds a sunset warning to the existing Pyth
tutorial linking to the migration page.

Contract addresses verified on-chain: proxies and implementations have
code, and the mainnet oracle serves a current CFX/USD price.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

@intrepidcanadian is attempting to deploy a commit to the SongForPrism Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
conflux-documentation Ready Ready Preview, Comment Jul 29, 2026 8:28am

A **Conflux-maintained, Pyth-compatible price oracle** is deployed as a drop-in read-side replacement. Existing integrators can migrate by pointing at a new contract address — the read functions and price feed IDs are unchanged for the major assets.
:::

The replacement oracle is an on-chain price feed service maintained for the Conflux community, with source code at [conflux-fans/oracle-contracts](https://github.com/conflux-fans/oracle-contracts). Its read API is fully compatible with the [Pyth SDK Solidity interface](https://github.com/pyth-network/pyth-sdk-solidity) (`getPriceUnsafe`, `getPriceNoOlderThan`, `getEmaPriceUnsafe`, `getEmaPriceNoOlderThan`), returning the same `PythStructs.Price` type.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getEmaPirceUnsafe and getEmaPriceNoOlderThan are not supported now, calling this method will result revert

Verified every read function against the deployed mainnet and testnet
contracts. Corrections:

- EMA prices are not available. Mainnet reverts with "EmaPrice not
  supported"; testnet does not revert and returns the spot price, so
  EMA-reading code passes on testnet and fails on mainnet.
- getPrice(id) is getPriceNoOlderThan(id, getValidTimePeriod()), and
  that window (3600s) equals the publish cadence, so passing 3600 to
  getPriceNoOlderThan reproduces the same behaviour.
- getValidTimePeriod() constrains only the deprecated getPrice /
  getEmaPrice, not getPriceNoOlderThan.
- getPriceUnsafe applies no staleness check; publishTime is the only
  indication of age.
- Reads revert with PriceFeedNotFound() / StalePrice() rather than
  returning sentinel values.
- updatePriceFeeds / updatePriceFeedsIfNecessary / getUpdateFee are
  absent from the bytecode, so leftover calls revert.
- USDT0 parity is a redemption property of the LayerZero OFT design,
  not a guarantee that the two trade identically.

Also drops suitability and staleness-bound recommendations in favour of
stating the mechanism, leaving those judgements to integrators.

Co-Authored-By: Claude <noreply@anthropic.com>
@intrepidcanadian

Copy link
Copy Markdown
Contributor Author

hi pana, updated based on your comments. checked - no ema on mainnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants