You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 58fdf49
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: finance/lending/anchor/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,7 +56,7 @@ closing the classic empty-pool inflation attack. The first deposit mints 1:1.
56
56
57
57
### Interest: a kinked curve and a cumulative index
58
58
59
-
Each `refresh_reserve` advances `cumulative_borrow_rate_index` by
59
+
Each `refresh_reserve` advances `borrow_accumulation_factor` by
60
60
`(1 + rate_per_slot * elapsed_slots)`. `rate_per_slot` comes from a kinked
61
61
utilization curve: linear from `min_borrow_rate_bps` to `optimal_borrow_rate_bps`
62
62
up to `optimal_utilization_bps`, then steeper to `max_borrow_rate_bps` at full
@@ -185,7 +185,7 @@ Suppliers deposit a token with `deposit_reserve_liquidity` and receive share tok
185
185
186
186
### How does interest accrue without looping over every account?
187
187
188
-
Through a cumulative interest index: `refresh_reserve` advances a per-reserve index along a utilization-based rate curve, and each obligation stores the index value from its last interaction. The gap between the two is the interest owed, so no per-account accrual loop is needed. This is the same technique the most-used Solana lending protocols share.
188
+
Through a cumulative accumulation factor: `refresh_reserve` advances a per-reserve factor along a utilization-based rate curve, and each obligation stores the index value from its last interaction. The gap between the two is the interest owed, so no per-account accrual loop is needed. This is the same technique the most-used Solana lending protocols share.
0 commit comments