Point the finance examples' oracle path at Pyth and rename the mock feed - #157
Merged
Merged
Conversation
The oracle network the lending, perpetual futures and prop AMM examples modeled their price feeds on has shut down: every implementation is deprecated and support ends on 25 September 2026. The examples still named it throughout, and their production-path comments told readers to build on it. The perpetual futures and prop AMM mock oracle program is now mock-price-feed (library mock_price_feed) in both Anchor variants. Its program ID, instructions, account name and layout are unchanged, so the programs' offset readers and every test keep working as before; only the crate, directory, Anchor.toml key and .so name move. The root workspace exclusion and lockfile entries follow the rename. The production path in every oracle reader, README and doc comment now reads a Pyth PriceUpdateV2 account, owned by the Pyth Receiver program, as basics/pyth already does. Lending's README no longer says it chose the old network over Pyth for compute cost. Changelog entries added at the root and in all nine example variants. Claude-Session: https://claude.ai/code/session_01Bb9YgXxuvSJThr3TjtDoca
…oard-refs-y9owt2 # Conflicts: # finance/lending/anchor-v1/CHANGELOG.md # finance/lending/anchor/CHANGELOG.md # finance/lending/quasar/CHANGELOG.md
…oard-refs-y9owt2 # Conflicts: # CHANGELOG.md
…oard-refs-y9owt2 # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The oracle network that the lending, perpetual futures and prop AMM examples modeled their price feeds on is shutting down. Every implementation is deprecated, support ends on 25 September 2026, and users are told to migrate to other providers. The examples still named it in 57 files, and their production-path comments told readers to build on it. After this PR,
git grep -ifor its name returns nothing.The mock oracle is renamed
mock-price-feed(librarymock_price_feed) in both Anchor v2 and Anchor v1. The prop AMM's Anchor v2 package ismock_price_feed_prop_amm, for the same lockfile reason as before.MockFeedaccount name and byte layout are unchanged. The programs' offset readers and the tests' instruction data are the same as before.Anchor.tomlkey, the.sothe tests load, the root workspace exclusion and the two rootCargo.lockentries change to the new name.The production path now points at Pyth
TERMINOLOGY.mdentry and doc comment now describes reading a PythPriceUpdateV2account owned by the Pyth Receiver program. Thebasics/pythexample already reads one.PriceUpdateV2fields ontoPriceFeed.Verification
The container could not reach the Solana installer, so
anchor buildand the LiteSVM runs are left to this PR's CI. Locally I checked:cargo test --no-runcompiles the Anchor v2 lending, perpetual futures and prop AMM programs, both mocks, and every test target. The build used empty placeholder.sofiles so the tests'include_bytes!resolves.anchor-v1workspaces and their tests.cargo check --testspasses for all three Quasar variants.rustfmt --checkis clean on every changed Rust file, exceptfinance/lending/anchor-v1. There rustfmt flags lines this PR does not touch, and those were unformatted onmainalready.Not in this PR
Cargo.lockonmainis already missing asolana-clockdependency forbetting-market, socargo --lockedfails onmainas it is. That is unrelated to this PR, so I restored the lockfile to change only the renamed entries.🤖 Generated with Claude Code
https://claude.ai/code/session_01Bb9YgXxuvSJThr3TjtDoca
Generated by Claude Code