Skip to content

Managed Fund: describe the confidence-interval check - #240

Merged
mikemaccana merged 1 commit into
mainfrom
claude/managed-fund-confidence-check-1o72xe
Oct 4, 2026
Merged

mikemaccana merged 1 commit into
mainfrom
claude/managed-fund-confidence-check-1o72xe

Conversation

@mikemaccana

Copy link
Copy Markdown
Collaborator

The companion program now rejects a Pyth price whose confidence interval is wider than 1% of the price. The check fails with OracleConfidenceTooWide and shipped in quicknode/solana-program-examples#188, which is merged and on main. Following the "fixed there, not described here" rule, this PR makes the chapter describe the defense in place of the gap.

Changes to building-financial-products-in-solana/managed-fund.md:

  • Failure Modes: the "a production fund should" sentence is replaced with a description of the check. The new text explains why it matters: deposits are priced from the price feed, and rebalance sets its slippage floor from it. It notes that withdrawal reads no price, so investors can still leave in kind. It names test_wide_confidence_price_rejected.
  • The same bullet said that no "deposit, withdrawal, or rebalance" runs on a bad price. Withdrawal never reads a price, so it now says "deposit or rebalance".
  • Valuation paragraph: the list of price-load rejections gains the confidence check, as its own sentence to stay under the lint's sentence-length limit.
  • Tests paragraph: names the new test.

OracleConfidenceTooWide and test_wide_confidence_price_rejected both exist in the companion repository's main.

npm run lint, node scripts/check-figure-geometry.mjs and npm run build-pdf all pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_013ji7D1gLxYnd1cdd6NMXQL


Generated by Claude Code

The companion program now rejects a Pyth price whose confidence
interval is wider than 1% of the price (OracleConfidenceTooWide,
quicknode/solana-program-examples#188). The Failure Modes section
describes the check and names test_wide_confidence_price_rejected in
place of the sentence saying a production fund should check confidence.
The valuation paragraph lists the check, the tests paragraph names the
test, and the price-feed bullet no longer says withdrawal reads a price.

Claude-Session: https://claude.ai/code/session_013ji7D1gLxYnd1cdd6NMXQL
@mikemaccana
mikemaccana merged commit 2b1bd06 into main Oct 4, 2026
1 check passed
@mikemaccana
mikemaccana deleted the claude/managed-fund-confidence-check-1o72xe branch October 13, 2026 00:23
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