Inside get_pnl_usd(), collateral_custody is used to compute max_profit_usd:
let max_profit_usd = min_collateral_price
.get_asset_amount_usd(position.locked_amount, collateral_custody.decimals)?;
locked_amount is stored in USDC units (6 decimals) — e.g., 10,000,000,000 for $10K
With correct USDC custody (6 decimals): 10,000,000,000 / 1e6 * $1 = $10,000 ✅
With wrong SOL custody (9 decimals): 10,000,000,000 / 1e9 * $85 = $850 ❌
The max_profit_usd is capped at $850 instead of $10,000 — a ~12x underestimate.
Additionally, collateral_custody.is_virtual triggers a special code path that uses a $1 reference price:
let min_collateral_price = if collateral_custody.is_virtual {
// Uses $1 reference price for virtual custody
OraclePrice { price: 10u64.pow(USD_DECIMALS), exponent: -(USD_DECIMALS) }
} else {
collateral_token_price.get_min_price(...)
};
When SOL custody (virtual=true) is wrongly passed, this uses $1/SOL instead of $1/USDC, further distorting the calculation.
Impact on AUM
Short profits are undervalued → AUM appears larger than reality
add_liquidity: LPs receive fewer LP tokens per dollar (pool overvalued)
remove_liquidity: LPs receive more dollars per LP token burned (draining pool)
Net: systematic value leakage from pool to LP removers during SOL price declines
Quantification
Per $10K aggregate short profit at SOL=$85:
Correct AUM reduction: -$10,000
Actual AUM reduction: -$850 (12x too small)
AUM overstatement: ~$9,150 per $10K short profit
With Jupiter's $100M+ TVL and significant short OI, this causes material LP token mispricing during volatile periods.