Skip to content

Pre-print verification: fix what the third audit's edits broke - #271

Merged
mikemaccana merged 2 commits into
mainfrom
claude/wonderful-hawking-5gg014-verify
Oct 6, 2026
Merged

mikemaccana merged 2 commits into
mainfrom
claude/wonderful-hawking-5gg014-verify

Conversation

@mikemaccana

@mikemaccana mikemaccana commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

A targeted pass over quicknode/solana-book#266 and quicknode/solana-program-examples#195. It checked every changed line against the code, the figures and the rest of the book, then had an independent agent re-check every fix. Merge quicknode/solana-program-examples#196 first: the lending chapter describes code that ships there.

The lending program, as the book now describes it

  • Liquidation takes no account a borrower controls. It closes an emptied collateral vault into the obligation, and close_obligation() later returns that rent to the owner. This fixes a security hole Time chapter: plain wording, the timestamp's real error, a simpler decision tree, and no repetition #195 introduced.
  • Borrow rates are capped at 300% a year (BorrowRateAboveCeiling).
  • The liquidation bonus must be payable at the threshold (LiquidationBonusUnpayable).
  • An update may raise a reserve's liquidation threshold but never lower it (RiskLimitLowered). The loan-to-value may still be lowered to stop new borrowing.
  • Bad debt: an obligation a liquidation leaves with debt and no collateral stays open until it is repaid, as the author decided.

Fixed

  • False generalizations: about closing accounts and about payout handlers.
  • The liquidation gloss in Core Building Blocks, which described selling collateral rather than repaying debt at a bonus.
  • Test descriptions that claimed more than their tests assert: the pause tests, the fundraiser's refusal tests, and two lending tests.
  • Single wrong statements:
    • the perps accumulator definition;
    • the options put sentence;
    • the order book's minimum-size and tree-depth sentences;
    • the glossary's unsettled balance and base token entries.
  • Conclusion: the incentive sentence now covers programs with no operator. The answer to the Introduction's promise to be responsible for your programs is restored.
  • Order book: the close section now follows the fee withdrawal, whose figure still draws both orders. The handler list now sits inside its box.
  • Lending figures: obligation boxes show what each step's handler stores, not what a later refresh would write.
  • The arithmetic chapter's K-check sentence and the restored rule about what the Operating chapter's bounds protect.

Print

Merged with main's new build scripts. PRINT-SPECIFICATION.md takes main's description of them, and this branch's build matches its numbers:

  • Pages: 307 paperback interior, 309 digital.
  • Spine and wrap: a 0.691in spine and a 15.821 x 9.94in wrap, which npm run build-pdf-paperback writes to build/cover-kdp-307pp-white.pdf.
  • Blank pages: nine before chapters and part titles, counted in the October 6 build.

Two footnote calls moved, so Paged.js no longer drops text at a page break; the build's overflow check caught both.

npm run lint, node scripts/check-figure-geometry.mjs (115 figures), npm run build-pdf-paperback and npm run build-pdf-digital all pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UX53A6YR1Hjr8z6WzJxf2q

Mike MacCana added 2 commits October 5, 2026 18:23
A targeted pass checked every line the third audit's round changed
against the companion, the figures and the rest of the book, then an
independent agent re-checked every fix.

The book follows the companion's lending fixes: liquidation takes no
account a borrower controls and closes an emptied vault into the
obligation, borrow rates are capped at 300% a year, a liquidation bonus
must be payable at the threshold, and an update may raise a reserve's
liquidation threshold but never lower it. An obligation a liquidation
leaves with debt and no collateral stays open until it is repaid.

Fixed: false generalizations about closing accounts and payout handlers,
the liquidation gloss, test descriptions that claimed more than their
tests assert, the perps accumulator definition, the options put
sentence, the glossary's unsettled balance and base token entries, the
conclusion's incentive sentence and its answer to the Introduction's
responsibility promise, the order book's close section moved after the
fee withdrawal its figure draws, its handler list spaced inside its
box, and lending's obligation boxes showing what each handler stores
rather than what a later refresh would write.

PRINT-SPECIFICATION.md carries the final build: 311 pages with the cover
and its blank reverse, 309 interior, a 0.696in spine and a 15.826 x
9.94in wrap. Two footnote calls moved so Paged.js no longer drops text
at a page break.

Lint, figure geometry and the full PDF build pass.

Claude-Session: https://claude.ai/code/session_01UX53A6YR1Hjr8z6WzJxf2q
Main split the PDF build into draft, digital and paperback scripts and
moved cover sizing into the paperback build. PRINT-SPECIFICATION.md
takes main's description of that, whose page counts this branch's
build matches: 307 paperback interior pages, 309 digital, a 0.691in
spine and a 15.821 x 9.94in wrap. The blank pages Paged.js inserts
before chapters and part titles are nine in today's build.

Claude-Session: https://claude.ai/code/session_01UX53A6YR1Hjr8z6WzJxf2q
@mikemaccana
mikemaccana merged commit 46f255f into main Oct 6, 2026
1 check passed
@mikemaccana
mikemaccana deleted the claude/wonderful-hawking-5gg014-verify 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