Repository navigation
Lending: draw Maria's opening deposits, and count a share's minor units - #172
Merged
Merged
Conversation
added 2 commits
September 23, 2026 03:13
The chapter says Maria makes each reserve's first deposit, 1,001 minor units, and no figure showed it. lending-open-reserves draws the three deposit_reserve_liquidity() calls: her USDC, NVDAx and SPCXx accounts pay 1,001 minor units into each vault, each share mint mints her one minor unit of shares, and the annotation says where the other 1,000 went. The price feeds, the lending market and the other users' token accounts are named rather than drawn, since the step does not touch them. The four later step figures have no room under Maria's wallet for six more boxes, so each names her token and share accounts in a not-drawn note, and says its balances and supplies leave out her opening deposits. A lending share has as many decimals as its asset, so Maria's deposit mints her one minor unit of shares, not one share. The Supplying paragraph and the share-inflation failure mode now say so, and Maria's deposit is its own paragraph ahead of the figure. Claude-Session: https://claude.ai/code/session_013vsKb7K4wGqggas2vtABoF
lending-account-map.svg and lending-reserves.svg stopped being referenced when the chapter moved to introducing each account where its handler creates it, and nothing in the book has pointed at them since. Claude-Session: https://claude.ai/code/session_013vsKb7K4wGqggas2vtABoF
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.
Follows #168. That PR's chapter text has Maria make each reserve's first deposit of 1,001 minor units, but no figure showed it.
Changes
New figure,
lending-open-reserves.svg: "Maria opens each reserve with a deposit". It shows her threedeposit_reserve_liquidity()calls:The four later step figures:
lending-deposit-shareslending-borrow-ltvlending-liquidationlending-liquidation-second-callEach gets a note that names Maria's token and share accounts as not drawn. There's no room under her wallet for six more boxes: her column is 62 units wide, with Dave's accounts on one side and the program box on the other. The note also says the figure's balances and supplies leave out her opening deposits, and the figures keep their whole-number values.
lending.md:WRITING-PLAN: Maria's deposit comes off the list of steps missing a figure.
Deleted:
lending-account-map.svgandlending-reserves.svg. Nothing in the book has referenced them since the chapter moved to introducing each account where its handler creates it.Checks
npm run lintis clean.node scripts/check-figure-geometry.mjsis clean across 99 figures.npm run build-pdfwrites the PDF.check-figure-bandsreports nothing in the new figure. Its hits in the four edited figures were already there onmain.🤖 Generated with Claude Code
https://claude.ai/code/session_013vsKb7K4wGqggas2vtABoF