Skip to content

Rename the lending index to the borrow accumulation factor - #26

Merged
mikemaccana merged 2 commits into
claude/book-time-and-address-kinds-rqs594from
claude/book-accumulation-factor
Aug 7, 2026
Merged

mikemaccana merged 2 commits into
claude/book-time-and-address-kinds-rqs594from
claude/book-accumulation-factor

Conversation

@mikemaccana

Copy link
Copy Markdown
Collaborator

Stacked on #22. Follows quicknode/solana-program-examples#121, which is merged.

The rename

cumulative_borrow_rate_index described neither a rate nor what the number is for. A rate is per unit of time; this value is the accumulated product of 1 + rate_per_slot × elapsed_slots, which is an accumulation factor — as its own doc comment already said. The companion repository renamed it, and this updates the book to match, so no prose names a field that does not exist.

From To
cumulative_borrow_rate_index borrow_accumulation_factor
borrowed_amount_scaled borrowed_principal

Changed:

  • solana-building-blocks/time.md — the formula block is now new factor = old factor × (1 + rate per slot × elapsed slots).
  • financial-programming-concepts-in-solana/the-arithmetic-of-money.md — this chapter owns the concept, so it carries the fullest definition. Heading is now "One Accumulation Factor Compounds Interest for Every Borrower".
  • building-financial-products-in-solana/lending.md — the account model and invariants sections.
  • appendices/glossary.md — the entry is retitled borrow accumulation factor and moved alphabetically into the B's.
  • Five lending figures that showed either identifier.

The perpetual futures venue's cumulative_funding is left alone. It is an additive accumulator (funding owed is size × (current − entry)), not a multiplicative factor, so "factor" would be wrong there.

Two clarity fixes carried along

  • The fundraiser's two handler conditions are now a two-item bulleted list. They are a comparison a reader wants to hold side by side. The prose after them keeps the reason both come from one expression.
  • The What You Learnt summary said four questions decide the clock; the decision tree asks three and defaults on three noes.

Verification

npm run lint clean, node scripts/check-figure-geometry.mjs clean across 72 figures, npm run build-pdf at 175 pages. Every renamed identifier greps to a real field in the companion repository at main.


Generated by Claude Code

claude added 2 commits August 7, 2026 17:27
The companion repository renamed `cumulative_borrow_rate_index` to
`borrow_accumulation_factor` and `borrowed_amount_scaled` to
`borrowed_principal`, because the old name described neither a rate nor
what the number is for. The book followed, so no prose names a field that
does not exist:

- the Time chapter's formula block and the surrounding prose
- the Arithmetic of Money heading and definition, which owns the concept
- the lending chapter's account model and invariants
- the glossary entry, retitled and moved into the B's
- five lending figures that showed either identifier

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ABFpszmPxRorwWtWGR2jXj
The pair of handler conditions is a two-item comparison a reader wants to
hold side by side, so it reads better as a list than as a sentence. The
prose after it keeps the reason the two conditions come from one
expression.

Also correct the What You Learnt summary, which said four questions decide
the clock when the decision tree asks three and defaults on three noes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ABFpszmPxRorwWtWGR2jXj
@mikemaccana
mikemaccana merged commit 538f670 into claude/book-time-and-address-kinds-rqs594 Aug 7, 2026
@mikemaccana
mikemaccana deleted the claude/book-accumulation-factor 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.

2 participants