Skip to content

Point the finance examples' oracle path at Pyth and rename the mock feed - #157

Merged
mikemaccana merged 4 commits into
mainfrom
claude/remove-switchboard-refs-y9owt2
Sep 23, 2026
Merged

mikemaccana merged 4 commits into
mainfrom
claude/remove-switchboard-refs-y9owt2

Conversation

@mikemaccana

Copy link
Copy Markdown
Collaborator

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 -i for its name returns nothing.

The mock oracle is renamed

  • The perpetual futures and prop AMM mock program is now mock-price-feed (library mock_price_feed) in both Anchor v2 and Anchor v1. The prop AMM's Anchor v2 package is mock_price_feed_prop_amm, for the same lockfile reason as before.
  • The program ID, instructions, MockFeed account name and byte layout are unchanged. The programs' offset readers and the tests' instruction data are the same as before.
  • The crate directory, the Anchor.toml key, the .so the tests load, the root workspace exclusion and the two root Cargo.lock entries change to the new name.

The production path now points at Pyth

  • Every oracle reader comment, README, TERMINOLOGY.md entry and doc comment now describes reading a Pyth PriceUpdateV2 account owned by the Pyth Receiver program. The basics/pyth example already reads one.
  • The lending README no longer says the old network was chosen over Pyth for compute cost. It now maps PriceUpdateV2 fields onto PriceFeed.
  • Older changelog lines that named the network are reworded. New dated entries are in the root changelog and all nine example variants.

Verification

The container could not reach the Solana installer, so anchor build and the LiteSVM runs are left to this PR's CI. Locally I checked:

  • cargo test --no-run compiles the Anchor v2 lending, perpetual futures and prop AMM programs, both mocks, and every test target. The build used empty placeholder .so files so the tests' include_bytes! resolves.
  • The same command compiles all three anchor-v1 workspaces and their tests.
  • cargo check --tests passes for all three Quasar variants.
  • rustfmt --check is clean on every changed Rust file, except finance/lending/anchor-v1. There rustfmt flags lines this PR does not touch, and those were unformatted on main already.

Not in this PR

Cargo.lock on main is already missing a solana-clock dependency for betting-market, so cargo --locked fails on main as 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

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
@mikemaccana
mikemaccana merged commit 0e23761 into main Sep 23, 2026
21 checks passed
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