Repository navigation
Describe the companion's new handlers and checks, and source nine claims - #258
Merged
mikemaccana merged 1 commit intoOct 4, 2026
Merged
Conversation
…rce nine claims The companion repository now closes a betting event, pauses an order book, checks which program owns a price feed, and bounds a price's confidence band (quicknode/solana-program-examples#190). The chapters describe each at the step where it is used and name the tests: Betting Market: Maria's close as a walkthrough step with its figure, close_outcome() and close_event(), open_bets and open_outcomes, the three refusals, and the State Machines rule met with each account's closer named. Order Book: pause_market() and resume_market(), what a pause stops and what it never stops, the five tests. Prop AMM and Perpetual Futures: price_feed_program recorded at creation and PriceFeedNotFromOracle first in every oracle read; the perps check list is seven. Lending: the price feed's confidence band, max_confidence_bps per reserve, OracleConfidenceTooWide, and the fifty-round-trip rounding test. Options: the put followed to expiry and reclaim, the duplicate mutable account that refuses a writer buying their own option, the inner-instruction count behind the zero-fee test, and the Kani harness for the fees invariant. Offchain Truth lists which programs check provenance and confidence. Program boxes in fourteen figures list the new handlers. Nine claims the audit could not source are corrected or qualified against their primary sources: the Neodyme fix named by function and site, Pyth Core's August 2026 migration, Mango's oracle price move as the CFTC states it, the Hundred and Sonne mechanism (borrowing against inflated collateral, not a loop of redeems), the World Bank's 6.36% average, the US card interchange schedule behind the café's fee, the slot-time stages and the pending mainnet 200 millisecond feature, the 1891 French law's actual provision, Zeta's wind-down and successor, and PsyOptions' launch date. The lint's "gate" rule now accepts the hyphenated form inside a URL. Claude-Session: https://claude.ai/code/session_01UX53A6YR1Hjr8z6WzJxf2q
mikemaccana
deleted the
claude/wonderful-hawking-5gg014-program-followup
branch
October 13, 2026 00:23
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.
Off
maindirectly (no stack). Two things in one commit, because the second touches chapters the first also edits.The book follows quicknode/solana-program-examples#190
The chapters describe each new mechanism at the step where it is used and name the test, with every identifier grepped against the companion at
main:close_outcome()andclose_event(),open_betsandopen_outcomes, the refusalsEventNotFinished,BetsStillOpen,OutcomesStillOpen; the dust now reaches the fee recipient; the State Machines rule is met and each account's closer is named (config stays open); four new tests named.pause_market()andresume_market(), what a pause stops (new orders) and never stops (cancels, settlement, fee withdrawal);is_activeandMarketPausedback as real; five tests named.price_feed_programrecorded at creation andPriceFeedNotFromOraclefirst in every oracle read; the perps check list is seven; the funding and first-deposit tests described as they now assert.max_confidence_bpsper reserve (validated 1 to 10,000),OracleConfidenceTooWide, five tests, and the fifty-round-trip rounding test.ConstraintDuplicateMutableAccountas what refuses a writer buying their own option; the zero-fee test's inner-instruction count; the Kani harnessproof_collect_fees_pays_only_the_fees_owedfor the fees invariant.price_feed_program.Nine unsourced claims, now sourced or corrected
From a source check against primary documents (Neodyme's post and SPL PR 1883, Pyth forum OP-PIP-131, the CFTC complaint, Hundred's and CertiK's post-mortems, the World Bank Q3 2025 report, Visa's US interchange schedule, Anza's feature tracker, the Universalis and Kentucky Derby pages and the 1891 law's text, Zeta's and PsyOptions' own posts):
try_round_u64()becametry_floor_u64()at both conversion sites, not "one word"; $2.6B is value at risk, with the PR linked.Manifest's URL was confirmed correct and left alone. The lint's "gate" rule now accepts the hyphenated form inside a URL (
Feature-Gate-Tracker-Schedule).Checks
npm run lintclean,node scripts/check-figure-geometry.mjsclean across 115 figures (one stale exception removed, since the arrow it excused now lands cleanly),npm run build-pdfbuilds (312 pages).🤖 Generated with Claude Code
https://claude.ai/code/session_01UX53A6YR1Hjr8z6WzJxf2q
Generated by Claude Code