Repository navigation
Order-book figures: vaults are market PDAs, and every account box sits beside its dot - #149
Merged
Merged
Conversation
mikemaccana
force-pushed
the
claude/confident-keller-2i6eks
branch
from
September 22, 2026 22:05
018b86d to
c2db4d8
Compare
added 2 commits
September 22, 2026 22:28
… dots sit on the curve Seven order-book figures and the token-account Venn figure drew the order book and the three vaults, all created from key pairs Maria's client generates, as offcurve dots captioned "A CLIENT KEYPAIR". That was wrong twice over: an address made from a key pair is a public key and is never off the curve, and a key pair is not an address at all, it is a public key and a private key, of which only the first is public. Each of the four accounts now has an r=6 dot on the curve, between Maria and the program, named for its account in the caption face because its box hangs too far below the program to reach the curve; the boxes carry no dot and no caption. To make room the USDC mint box moves left, the network label rises, and the program column drops ten units, with the arrows that touch it re-aimed. The Venn figure's base vault sits on a piece of curve as the legends do, and the "always off curve" headline now says derived token accounts, since the previous figure shows one that is not. Rules so it cannot recur: check-figure-geometry.mjs fails an r=6 dot clear of the curve and an r=5.5 dot touching it; lint-manuscript.mjs fails a caption naming a key pair and prose that calls a key pair an address, an account, or off the curve; WRITING-PLAN.md records the convention, and the companion plugin's DIAGRAMS.md and SKILL.md carry the matching rules. The order-book chapter and the tokens chapter say where these addresses come from. Claude-Session: https://claude.ai/code/session_011VUvZT5384GaSBhhgJwFp3
…side its dot The first fix named the order book's and the vaults' dots on the curve and left their boxes up to 300 units below, so a reader had to match a label to a box half a page away. The companion program now makes the three vaults PDAs of the market (quicknode/solana-program-examples#148), so they draw like every other program-owned account: an offcurve dot beside a seed caption, "BASE_VAULT" + MARKET ADDRESS and its siblings, in the column where their boxes and arrows already were on main. The order book is the one account the client must create, so its dot stays on the curve, and its box moves above the curve at the top right, beside its dot, where the USDC mint box was. The NVDAx and USDC mint boxes go: these figures name the mints only in seeds and fields, and a not-drawn note says so. The token-account Venn figure's base vault gets its seed caption too, and the order-book chapter says the vaults are market PDAs. The geometry checker now measures address dots after transforms and gains check 12: every address dot sits within 20 of an account box, legend keys aside. It fails the named-dot figures this replaces. The named-dot wording leaves WRITING-PLAN.md and the lint message. Claude-Session: https://claude.ai/code/session_011VUvZT5384GaSBhhgJwFp3
mikemaccana
force-pushed
the
claude/confident-keller-2i6eks
branch
from
September 22, 2026 22:30
73610dc to
96baff7
Compare
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.
Seven order-book figures and the token-account Venn figure drew the order book and the three vaults as offcurve dots captioned
A CLIENT KEYPAIR. That was wrong twice over. An address made from a key pair is a public key and is never off the curve. And a key pair is not an address: it is a public key and a private key, of which only the first is public.Merge after quicknode/solana-program-examples#148. That pull request makes the vaults PDAs of the market. This one names its seeds, and the book never names what the companion repository hasn't shipped.
Figures
"BASE_VAULT" + MARKET ADDRESS,"QUOTE_VAULT" + MARKET ADDRESSand"FEE_VAULT" + MARKET ADDRESS. They sit in the program column where their boxes and arrows already were on main.token-accounts-and-atas.svg: the market's base vault gets its seed caption, and the labels say it is a PDA of the market.token-accounts-off-the-curve.svg: the headline "Token accounts are always off curve" becomes "Derived token accounts sit off the curve", and the legend's on-curve dot takes the public-key radius.Prose
Rules so it cannot recur
scripts/lint-manuscript.mjsfails any figure caption naming a key pair, and any prose calling a key pair an address, an account, or on or off the curve.scripts/check-figure-geometry.mjscheck 9: anr="6"dot must touch the curve and anr="5.5"dot must sit clear of it.cx/cy, which is wrong for figures that position whole columns with a translate.WRITING-PLAN.mdrecords the convention. The matching figure and vocabulary rules for the companion plugin are in DIAGRAMS.md, SKILL.md: a key pair is never off the curve, never an address, and its box sits beside its dot solana-finance-claude-plugin#63.Lint, the geometry check, and the full PDF build all pass.
check-figure-bands.mjs(advisory) reports one band in the withdraw-fees figure, left where the order-book box used to sit in the program column.🤖 Generated with Claude Code
https://claude.ai/code/session_011VUvZT5384GaSBhhgJwFp3