Repository navigation
Rename the lending index to the borrow accumulation factor - #26
Merged
mikemaccana merged 2 commits intoAug 7, 2026
Merged
mikemaccana merged 2 commits into
mikemaccana merged 2 commits into
Conversation
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
This was referenced Aug 7, 2026
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.
Stacked on #22. Follows quicknode/solana-program-examples#121, which is merged.
The rename
cumulative_borrow_rate_indexdescribed neither a rate nor what the number is for. A rate is per unit of time; this value is the accumulated product of1 + 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.cumulative_borrow_rate_indexborrow_accumulation_factorborrowed_amount_scaledborrowed_principalChanged:
solana-building-blocks/time.md— the formula block is nownew 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 retitledborrow accumulation factorand moved alphabetically into the B's.The perpetual futures venue's
cumulative_fundingis left alone. It is an additive accumulator (funding owed issize × (current − entry)), not a multiplicative factor, so "factor" would be wrong there.Two clarity fixes carried along
Verification
npm run lintclean,node scripts/check-figure-geometry.mjsclean across 72 figures,npm run build-pdfat 175 pages. Every renamed identifier greps to a real field in the companion repository atmain.Generated by Claude Code