@kasufinance/kasu-sdk 2.15.0 → 2.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -142,6 +142,22 @@ slightly more than lifetime interest (up to about 0.2 %, top-ups are valued at
142
142
  today's share price), so show "earned to date" from the lifetime figure, not
143
143
  from the sum of the bars.
144
144
 
145
+ Each cycle's interest is paired with the shares in force when that cycle's
146
+ clearing applied it — before the clearing accepted any request — so a
147
+ withdrawal the pool manager accepted between clearings is out of the next
148
+ cycle's figures, and the newest bar equals `getPositions`' last-epoch figure.
149
+
150
+ The subgraph counts a lender's shares as a ledger of accepted deposits and
151
+ withdrawals. Shares moved to or from a wallet any other way are not on it.
152
+ `getPositions` compares the ledger with the chain AT THE BLOCK THE SUBGRAPH
153
+ ANSWERED AT (so indexing lag is never a fault). Where they disagree it reads
154
+ the tranche balances from the chain, so a balance is never negative, and
155
+ sets `ledgerMismatch` on the pool. `ledger-exceeds-chain` (the wallet sent
156
+ shares away) withholds the pool's last-cycle figures and leaves the pool out
157
+ of `getYieldHistory`. An `investedAmount` raised to 0 carries
158
+ `investedAmountFloored`. Lifetime figures stay ledger figures, which include
159
+ the moved principal.
160
+
145
161
  `kasu.strategies.getPoolTvlHistory(poolId, { fromEpoch?, count?, timeoutMs?,
146
162
  signal? })` returns the strategy's TVL (total lent by everyone) as
147
163
  `{ epochId, timestamp, tvl, kind }[]`, ascending in time: one