Skip to content
docs

aprFromPrices

aprFromPrices(p0, p1, t0Ms, t1Ms): number

Defined in: protocol-staking-liquid-near/src/math.ts:34

Annualized price growth in percent: (p1 / p0 − 1) × year / Δt × 100, simple (not compounded), computed in 10^12 fixed point. 0 when the inputs cannot give a figure (no time passed, no price).

bigint

bigint

number

number

number