@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / accrueCompounded

Function: accrueCompounded()

accrueCompounded(indexRay, rateRay, lastUpdateTimestamp, nowSec): bigint

Defined in: packages/sdk/src/lend/math.ts:33

Grow a borrow-side index compounded from lastUpdateTimestamp to nowSec at rateRay, using Aave's three-term binomial expansion of (1+r/s)^dt (MathUtils .calculateCompoundedInterest). Returns the ray index current to nowSec.

Parameters

indexRay

bigint

rateRay

bigint

lastUpdateTimestamp

number

nowSec

number

Returns

bigint