Skip to content

Lending: draw Maria's opening deposits, and count a share's minor units - #172

Merged
mikemaccana merged 2 commits into
mainfrom
claude/laughing-noether-ox587k
Sep 23, 2026
Merged

mikemaccana merged 2 commits into
mainfrom
claude/laughing-noether-ox587k

Conversation

@mikemaccana

@mikemaccana mikemaccana commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

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 three deposit_reserve_liquidity() calls:

    • Her USDC, NVDAx and SPCXx accounts each pay 1,001 minor units into the reserve's vault.
    • Each share mint mints her one minor unit of shares.
    • The six value movements are numbered in a key box.
    • A two-line annotation explains the 1,000 withheld shares, which the drawing can't show.
    • The price feeds, the lending market and the other users' token accounts are named in a not-drawn note instead of drawn. The step doesn't touch them.
  • The four later step figures:

    • lending-deposit-shares
    • lending-borrow-ltv
    • lending-liquidation
    • lending-liquidation-second-call

    Each 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:

    • A lending share has as many decimals as its asset, so Maria's deposit mints one minor unit of shares, not one share. The Supplying paragraph and the share-inflation failure mode now say so.
    • Maria's deposit is now its own paragraph, ahead of the new figure.
  • WRITING-PLAN: Maria's deposit comes off the list of steps missing a figure.

  • Deleted: lending-account-map.svg and lending-reserves.svg. Nothing in the book has referenced them since the chapter moved to introducing each account where its handler creates it.

Checks

  • Lint: npm run lint is clean.
  • Figures: node scripts/check-figure-geometry.mjs is clean across 99 figures.
  • Build: npm run build-pdf writes the PDF.
  • Dead-space check: check-figure-bands reports nothing in the new figure. Its hits in the four edited figures were already there on main.

🤖 Generated with Claude Code

https://claude.ai/code/session_013vsKb7K4wGqggas2vtABoF

Mike MacCana 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
@mikemaccana
mikemaccana merged commit abafd33 into main Sep 23, 2026
1 check passed
@mikemaccana
mikemaccana deleted the claude/laughing-noether-ox587k 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