Skip to content

Review round two: Part II reorder, a closing chapter, redrawn figures, and naming rules - #13

Merged
mikemaccana merged 11 commits into
mainfrom
claude/review-fixes-reorder-and-conclusion-px8rd3
Jul 31, 2026
Merged

mikemaccana merged 11 commits into
mainfrom
claude/review-fixes-reorder-and-conclusion-px8rd3

Conversation

@mikemaccana

@mikemaccana mikemaccana commented Jul 31, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #12, which is already merged. Eleven commits of review fixes.

Structure

Part I is renamed from "The Foundations" to "The Fundamentals", which no longer reads as the Solana Foundation.

Part II is reordered into three triads. The Betting Market opened by calling itself "the escrow chapter with many parties", and that is its only prerequisite, yet it sat sixth, wedged inside the market-making arc. It moves to third:

11–13 Escrow, Fundraiser, Betting Market custody and pooling
14–16 Order Book, Constant-Product AMM, Prop AMM market making
17–19 Lending, Vault Strategy, Perpetual Futures credit and leverage

The three market-making chapters chain forward through each other's opening lines, so they stay contiguous. The move also puts the simple form of the offchain-truth question, an admin signing a result, before the oracle-fed form. Prose cross-references use chapter names rather than numbers, so the cost was the table of contents plus four headings, and two handoff sentences whose adjacency changed.

Chapter 20: Where to Go From Here is new. Every chapter ended with What You Learnt except the book, which stopped on Perpetual Futures. The Introduction makes five promises and nothing closed that loop. The chapter covers the six pieces every program here is built from, what those promises now cash out to, what the book left out on purpose and where to look instead, how to get a first build to something shippable, and how to send corrections back.

Acknowledgements move to a new postlude. Technical reviewers stay at the front, because visible peer review is a credibility signal a reader wants before committing. The thank-you list is for the people named, and it grows with every edition and errata contributor.

Accuracy

  • Cross-border payment costs were two flavours of average. Now a range with its scope and source stated: under 1% through a digital service to over 20% in cash on the worst corridors, cited to the World Bank, which counted thirteen corridors above 20% in Q3 2025. A US-only reader should be able to check the number rather than conclude it was invented.
  • ATA seed labels named the wrong program in 40 figures, 239 labels. They listed the Associated Token Program, which derived the address, instead of the token program, which is one of the three seeds. Now OWNER'S ADDRESS + TOKEN PROGRAM + MINT, with a lint rule so it cannot come back.
  • Chapter 8's opening fact was "What is NVIDIA trading at?", which a reader can answer from an onchain order book in this book's own chapters. Replaced with a rate decision, which has no onchain source.
  • The cluster paragraph implied mainnet was a test target. Now localnet then devnet, with mainnet as where a finished program goes live.

Figures

  • The fundraiser thermometer spread one sentence across seven slices stacked upward, so reading down gave "backers more seven". Those are now seven named backers, each slice as tall as what that person gave.
  • The constant-product curve is three panels, one per 100 USDC buy, so the same money visibly buys 40.0 then 32.7 then 27.3 ACME. The three trades sum to exactly the single jump the old figure drew.
  • The stranded-deposit path was a crossed-out empty box; it is now an ordinary account holding tokens and rent that no handler can return.
  • Instruction-routing arrows are gone from both transaction figures. Arrows in this book mean value moving, and the instruction row already names its program.

Language

  • PDA and account had drifted into synonyms ("market PDA" eight times against "market account" twice, same thing). A PDA is an address, an account is the data at it, and each usage now follows its sentence.
  • Setup handlers are initialize_x(), matching Name every setup handler initialize_x() solana-program-examples#117. Domain verbs keep the domain's word.
  • "bytecode" is gone from the prose in favour of "program" and "code".
  • The instruction versus instruction handler rule is now a boxout, naming where readers meet the collision.
  • "ingredients" became "seeds", glossed as "(the inputs)" at first use.
  • The PDAs chapter opens from ATAs, generalising from what the reader already uses.

Typography

Justified text absorbed long unbreakable identifiers into the word spaces of the line before, and the book has 127 inline code spans of 24+ characters. The worst measured about eight times the normal word space. Inline code now carries a break opportunity after underscores, using <wbr> so copied identifiers stay whole and no hyphen appears. A break must leave eight characters behind and carry five over, so test_ never strands.

Also adds npm run preview, which rasterises the page carrying a given phrase, so typography can be looked at rather than argued about.

Verification

npm run lint and npm run build-pdf clean, 162 pages. Every handler and test name the manuscript cites was re-checked against the companion repository after the renames: all present, with transfer_checked the one expected outsider since it belongs to SPL.

One caveat worth a human eye: the World Bank figures come from search results reporting their Remittance Prices Worldwide publication rather than from the PDF itself, which returns 403 to automated requests. Consistent across several independent summaries, but worth confirming before print.

claude added 11 commits July 31, 2026 02:49
…s, seeds

- Rename Part I from "The Foundations" to "The Fundamentals", which no
  longer collides with the Solana Foundation.
- Replace the cross-border payment figures in the Introduction with a
  low end (a digital service like Wise, under 1%) and a high end (cash
  over a Western Union or MoneyGram counter on the worst corridors, over
  20%), against the World Bank global average.
- Reword the cluster paragraph so development reads as localnet then
  devnet, with mainnet as where a finished program goes live rather than
  a place to test.
- Drop the arrows from a transaction's instruction rows to the programs
  they invoke, in both transaction figures. Arrows in this book mean
  value moving, and the instruction row already names its program. Record
  the convention in WRITING-PLAN.md.
- Say "seeds" rather than "ingredients" for PDA derivation inputs,
  glossed as "(the inputs)" at first use and again in the PDAs chapter.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDUxWXgCA5TsoPPxHzRNen
The 20% end of the range is true in some parts of the world and nowhere
near a US reader's experience, so say so and cite it: link the World
Bank's Remittance Prices Worldwide, name the quarter, and give the
corridor count behind the number. Add the general rule to WRITING-PLAN.md
so every outside statistic states its scope and links its publisher.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDUxWXgCA5TsoPPxHzRNen
The PDAs chapter now starts from the associated token accounts the
reader has been using since Tokens: an ATA's address is derived from
three seeds, and the three properties that buys are the three jobs the
chapter goes on to describe. The general definition follows from the
example rather than preceding it, and the Associated Token Program is
named as one program's choice of seeds among many.

Redraw the rent lifecycle's third path as an ordinary account rather
than a crossed-out empty box: a vault, with its icon, holding tokens and
rent that no handler can return. Drop "(the bug this chapter forbids)",
which read strangely because every bug is forbidden, and say plainly
that a state with no exit is a bug in the program.

Record the ATA seed-list defect in the figures for the visual pass: the
labels name the deriving program instead of the token program seed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDUxWXgCA5TsoPPxHzRNen
"What is NVIDIA trading at?" was the weakest of the four opening
examples in Offchain Truth, because NVDAx trades onchain in this book's
own chapters, so a reader can answer it from an order book without
leaving the chain. A rate decision has no onchain source at all: the
FOMC is the only place the fact exists.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDUxWXgCA5TsoPPxHzRNen
…ased

The Adversary's price-manipulation section called a bent price a
"purchased" one. Manipulation is the accurate word and the one the
War Story already uses, so the heading, the closing line, the defense
paragraph and the summary bullet all say it.

Sweep the ATA seed labels across 40 figures, 239 labels: they named the
Associated Token Program, which derived the address, instead of the
token program, which is one of the three seeds. Every seed list in the
book leaves the deriving program implied, so these now read OWNER'S
ADDRESS + TOKEN PROGRAM + MINT. Twenty-seven labels wrapped mid-phrase
and were re-wrapped rather than substituted. Tokens now lists the seeds
in the same order the figures draw them, the convention is written down
in WRITING-PLAN.md, and a figure lint rule keeps it from coming back.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDUxWXgCA5TsoPPxHzRNen
"The rules are the deployed bytecode" reaches for a precise word where a
plain one carries the same meaning, and the book's own plain-language
principle says not to. Every prose use is now "the deployed program" or
"compiled code"; The Adversary keeps the source-versus-compiled contrast
because that contrast is its point. Add the rule to WRITING-PLAN.md.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDUxWXgCA5TsoPPxHzRNen
The distinction between an instruction and an instruction handler was a
clause buried mid-paragraph, which is too little weight for a term the
rest of the book leans on. It is now a boxout of its own, and it names
the collision rather than only asserting the rule: other material uses
one word for both, and Anchor's generated interface file lists a
program's functions under "instructions", so a reader meeting that
elsewhere knows to read it as a handler. The glossary entry says the
same. The paragraph keeps the definition and loses the aside.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDUxWXgCA5TsoPPxHzRNen
Justified text absorbs an unbreakable identifier into the word spaces of
the line before it, and the book has 127 inline code spans of 24
characters or more, so whole paragraphs came out visibly loose. The
worst measured about eight times the normal word space.

Inline code now carries a break opportunity after an underscore, which
is where a reader's eye already segments a snake_case name. It is a
<wbr>, not a character, so a copied identifier is still whole and no
hyphen appears that could be mistaken for part of the name. A break has
to leave eight characters behind and carry five over, so "test_" never
strands at the end of a line: 50 identifiers break book-wide, none
badly.

The Kani paragraph named three harnesses in one sentence, which is the
grid shape WRITING-PLAN.md already says belongs in a list. As a list it
needs no breaks at all, and the paragraph drops from ten lines to two.

Add npm run preview, which rasterizes the page carrying a given phrase,
so typography changes can be eyeballed rather than guessed at.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDUxWXgCA5TsoPPxHzRNen
The thermometer spread one sentence across seven slices, stacked upward,
so reading down the stack gave "backers more seven". Those seven slices
are now seven named backers, and every slice is as tall as what that
person gave, which is what a thermometer is for. Varied amounts mean
eleven backers rather than ten, so the prose, the caption and the receipt
count follow; ten stays the stated floor, and it now reads as a floor
because this raise needed more. The companion repository's success test
still funds with exactly ten at the cap, so that sentence is unchanged.

The constant-product curve showed one before-and-after jump. It is now
three panels, one per 100 USDC buy, so the same money visibly buys 40.0
then 32.7 then 27.3 ACME while spot climbs from $2.25 to $4.00. The
three trades sum to exactly the single jump the old figure drew.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDUxWXgCA5TsoPPxHzRNen
The Betting Market opened by calling itself "the escrow chapter with
many parties", and that is its only prerequisite, yet it sat sixth,
wedged inside the market-making arc. It moves to third. The order book,
constant-product AMM and prop AMM chain forward through each other's
opening lines and stay contiguous, shifted one later each.

Part II now reads as three groups of three: custody and pooling
(escrow, fundraiser, betting market), market making (order book,
constant-product, prop AMM), and credit and leverage (lending, vault,
perpetuals). It also puts the simple form of the offchain-truth
question, an admin signing a result, before the oracle-fed form.

Prose cross-references use chapter names rather than numbers, so the
move is the table of contents plus four headings. Two handoff sentences
did need rewriting, because adjacency changed: the fundraiser now hands
off to the betting market, and the betting market to the trading floor.

Separately, PDA and account had drifted into synonyms: "market PDA"
eight times against "market account" twice, for the same thing. A PDA
is an address and an account is the data at it, so each usage now
follows what its sentence is about, and the rule is written down.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDUxWXgCA5TsoPPxHzRNen
…alize_

Every chapter ended with What You Learnt except the book, which stopped
on Perpetual Futures and said nothing about what the reader now had. The
Introduction makes five promises and nothing ever closed that loop.
Chapter 20 does: the six pieces every program here is built from, what
those five promises now cash out to, what the book left out on purpose
and where to look instead, how to take the next build to something
shippable, and how to send corrections back.

Acknowledgements move from the front to a new postlude. Technical
reviewers stay at the front, because visible peer review is a
credibility signal a reader wants before committing; the thank-you list
is for the people named, and it grows with every edition and every
errata contributor, so it costs a front-matter page for nothing.

The eight renamed setup handlers land in the prose too. Every handler
and test name the manuscript cites was re-checked against the companion
repository: all present, with transfer_checked the one expected outsider
because it belongs to SPL. The naming rule is recorded in WRITING-PLAN.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BDUxWXgCA5TsoPPxHzRNen
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.

2 participants