liquidityUnitPriceInAsset() method calculates the price per unit of liquidity in underlying asset terms, considering only the principal value (excluding fees) for a specific tick range.
Usage
Parameters
Returns
Returns anumber representing the price per unit of liquidity in underlying asset terms (principal only).
Returns 0 if:
- No ticks exist in the specified range
- Total share supply is 0
lowerTickKey >= upperTickKey(throws error)
Calculation Details
The method:- Filters tick intervals within the specified range
- Aggregates
principalPt,principalSy, andprincipalShareSupplyacross intervals - Calculates PT asset value using time decay:
- Computes total principal value:
- Returns price per unit: