Skip to main content
LP price is based on effective NAV, not raw token balance. Use LP price helpers when possible. For raw/display units, see Units and Fees.

LP Price

lpPrice=effectiveNAV+1NAVtotalLpSupply+1\text{lpPrice} = \left\lfloor \frac{\text{effectiveNAV} + 1_{\text{NAV}}}{\text{totalLpSupply} + 1} \right\rfloor The virtual terms make empty-supply and first-deposit cases well-defined. In raw SDK bigint values, 1_NAV is 1_000_000_000_000.
await market.reload();

const seniorLpPrice = market.getSrLpPriceNetAsset();
const juniorLpPrice = market.getJrLpPriceNetAsset();

const seniorEffectiveNav = market.getSrEffNetAssetValue();
const juniorEffectiveNav = market.getJrEffNetAssetValue();

Position NAV

For collateral or portfolio integrations, price LP balances from effective NAV: positionNAV=lpBalance×lpPrice\text{positionNAV} = \text{lpBalance} \times \text{lpPrice} In raw SDK values, lpPrice is already NAV per raw LP share, so lpBalanceRaw * lpPriceRaw returns raw fixed-point NAV units. If your system normalizes token amounts for display, normalize both LP balance and NAV consistently at the display layer. For transaction preview formulas, see Deposit Previews and Withdrawal Previews.