Repository navigation
Let each market's state account own its vaults - #107
Merged
Merged
Conversation
The token swap, prop AMM, perpetual futures, and options venues each had a dataless "authority" PDA beside their state account, existing only to own the vaults and sign for them. A program-owned data account signs with its own seeds just as well, as the escrow's offer account already did, and the seeds never change however the account's data does, so the extra account bought nothing but one more account per instruction. The companion repository now has the pool config, market, or pool own its vaults and mints directly, and the four chapters and their sixteen figures follow: the authority box is gone from every account map and lifecycle figure, each vault's owner label names the state account, and the prose says the state account signs. Claude-Session: https://claude.ai/code/session_014RdEWCoCChaoKPhvcftHVG
Merged
2 of 3 tasks
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.
Summary
Merge quicknode/solana-program-examples#145 first. This PR describes the companion repository after that change lands.
The token swap, prop AMM, perpetual futures, and options venues each had a dataless "authority" PDA beside their state account, existing only to own the vaults and sign for them. A program-owned data account signs with its own seeds just as well, as the escrow's offer account already did, and the seeds never change however the account's data does, so the extra account bought nothing but one more account per instruction. The companion repository now has the pool config, market, or pool own its vaults and mints directly and sign with its own seeds.
Here, the four chapters and their sixteen figures follow:
One commit. Authored under the book author's own email with no assistant co-author trailer, per
CLAUDE.md. Independent of #106, which carries the Options chapter's wording edits; the two touch different sentences ofoptions.md.Verified
npm run lintandnode scripts/check-figure-geometry.mjsare clean across all 91 figures,node scripts/check-figure-bands.mjsreports no new dead space in the changed figures, andnpm run build-pdfproduces 276 pages with the title page on page 3 and every part and chapter opening on a right-hand page.🤖 Generated with Claude Code
https://claude.ai/code/session_014RdEWCoCChaoKPhvcftHVG
Generated by Claude Code