Skip to content

Replace Pyth price feeds with API3 - #297

Merged
0xJem merged 8 commits into
price-feed-improvementsfrom
price-api3-oracle-config
Jun 9, 2026
Merged

0xJem merged 8 commits into
price-feed-improvementsfrom
price-api3-oracle-config

Conversation

@0xJem

@0xJem 0xJem commented Jun 9, 2026 •

Copy link
Copy Markdown
Member

Summary

  • replace Pyth ETH/USD and USDS/USD configuration with API3 Chainlink-interface feeds
  • remove Pyth from the PRICE v1.2 deploy/configuration path and docs
  • update fork/proposal tests for the API3 USDS/USD deployment block and current fork-block price ranges

Rationale

Pyth is no longer viable for this configuration because reliable updates require paid Hermes access. API3 provides Chainlink-interface compatible reader proxies for ETH/USD and USDS/USD, with 25-hour staleness thresholds to allow one hour of grace over a 24-hour heartbeat.

Validation

  • forge test --match-contract OlympusPricev1_2ForkTest
  • git diff --check
  • pnpm exec prettier --check snapshots/OlympusPricev1_2ForkTest.json

Summary by CodeRabbit

Release Notes

  • Documentation

    • Updated oracle configuration documentation to reflect switch from Pyth to API3 price feeds for asset pricing
    • Revised deployment instructions for the updated oracle setup workflow
  • Configuration

    • Switched oracle feed providers to API3 for price data resolution
    • Updated feed update thresholds and price tolerance parameters accordingly
  • Tests

    • Updated test suites to validate new oracle feed configuration and pricing mechanisms

@coderabbitai

coderabbitai Bot commented Jun 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b22b4dab-d4df-41d7-b844-e286593c786f

📥 Commits

Reviewing files that changed from the base of the PR and between caef479 and e8a6fb3.

📒 Files selected for processing (9)
  • documentation/price.md
  • documentation/price_v1_upgrade.md
  • snapshots/OlympusPricev1_2ForkTest.json
  • src/proposals/OracleProposal.sol
  • src/scripts/deploy/savedDeployments/price_v1_2_deploy.json
  • src/scripts/ops/batches/ConfigurePriceV1_2.sol
  • src/scripts/ops/batches/args/ConfigurePriceV1_2.json
  • src/test/modules/PRICE/OlympusPricev1_2Fork.t.sol
  • src/test/proposals/OracleProposal.t.sol
💤 Files with no reviewable changes (1)
  • src/scripts/deploy/savedDeployments/price_v1_2_deploy.json

📝 Walkthrough

Walkthrough

This PR migrates the PRICE v1.2 oracle system from Pyth price feeds to API3-backed Chainlink-compatible feeds. Changes remove all Pyth integrations across documentation, deployment configuration, script wiring, oracle mocking, and test setup, replacing them with API3 feeds for ETH/USD and USDS/USD, updating fork blocks, and adjusting validation bounds accordingly.

Changes

Pyth to API3 Oracle Feed Migration

Layer / File(s) Summary
Documentation updates reflecting oracle feed swap
documentation/price.md, documentation/price_v1_upgrade.md
Configuration tables, update thresholds, and Mermaid sequence diagrams for wETH, USDS, and OHM are updated to replace Pyth participants/paths with API3 ones. Deployment guidance and batch action descriptions reflect removal of PythPriceFeeds from the 5-to-4 submodule roster.
Deployment sequence configuration
src/scripts/deploy/savedDeployments/price_v1_2_deploy.json, src/scripts/ops/batches/args/ConfigurePriceV1_2.json
Module sequence replaces PythPriceFeeds with ChainlinkPriceFeeds. Configuration args add api3EthUsd, api3UsdsUsd, and their update thresholds while removing Pyth feed parameters; ohmExpectedPrice and ohmExpectedToleranceBps are updated.
Configuration script wiring for API3 feeds
src/scripts/ops/batches/ConfigurePriceV1_2.sol
Removes PythPriceFeeds import. Adds API3 feed address loading/labeling for ETH/USD and USDS/USD. Replaces the third feed component in USDS and wETH strategies from Pyth to Chainlink-compatible API3 feeds with updated thresholds. Adjusts submodule installation order (removing Pyth, keeping Chainlink/Uniswap/ERC4626/Strategy).
Oracle proposal mocking and test fixtures
src/proposals/OracleProposal.sol, src/test/proposals/OracleProposal.t.sol
OracleProposal removes IPyth import, Pyth constants, and _mockPythFeedAt helper; adds API3 feed address constants; extends _mockPriceFeedsAtTimelockExecution to mock API3 feeds. Test removes Pyth deployment helper and submodule installation; updates fork block constant.
PRICE v1.2 fork test configuration and asset wiring
src/test/modules/PRICE/OlympusPricev1_2Fork.t.sol
Removes PythPriceFeeds import/instantiation. Adds API3 feed address constants and updates FORK_BLOCK, OHM_USD_PRICE, and validation bounds. Adds _labelMainnetAddresses() helper for address debugging. Restores ConvertibleDepositAuctioneer and EmissionManager sizing in setUp under TIMELOCK prank. Replaces wETH/USDS Pyth feed components with API3-backed Chainlink ones. Updates heartbeat test to capture/assert market ID increases instead of asserting deterministic market ID.
Test snapshot updates
snapshots/OlympusPricev1_2ForkTest.json
Updates snapshot values for getPrice_OHM, heartbeat, heartbeat_emissionManager, and heartbeat_yrf reflecting API3-backed oracle results.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • OlympusDAO/olympus-v3#193: Introduces Pyth oracle integration that this PR removes (IPyth/PythPriceFeeds/related mocking and configuration).
  • OlympusDAO/olympus-v3#201: Establishes initial PRICE v1.2 deployment and configuration plumbing using Pyth, which this PR replaces with API3 feeds.

Poem

🐰 From Pyth to API3's light so bright,
Our oracle feeds now shine more tight,
With Chainlink's dance and feeds so true,
The PRICE v1.2 shines brand new! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Replace Pyth price feeds with API3' directly and clearly summarizes the main change across all modified files: replacing Pyth oracle feeds with API3 feeds throughout deployment, configuration, documentation, and tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch price-api3-oracle-config

Comment @coderabbitai help to get the list of available commands and usage tips.

@0xJem 0xJem self-assigned this Jun 9, 2026
@0xJem
0xJem marked this pull request as ready for review June 9, 2026 13:45
@0xJem
0xJem merged commit 813f7c7 into price-feed-improvements Jun 9, 2026
15 checks passed
@0xJem
0xJem deleted the price-api3-oracle-config branch June 9, 2026 14:03
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.

1 participant