Pnl Calculation
Pear Protocol calculates PnL at the basket/pair level, while Hyperliquid UI calculates PnL at the asset level. Because these models track entry prices differently, the PnL shown in Pear UI may differ from Hyperliquid UI until all related positions are closed.
Pear PnL Model (Pair-Level Accounting)
Pear records the entry price of each asset separately for each basket/pair.
PnL is calculated as:
direction Γ (exit price β pair-specific entry price) Γ size
β builder fee
β Hyperliquid feeWhere:
direction = +1for long positionsdirection = -1for short positionsPair-specific entry price is the assetβs entry price within that basket/pair only
Each basket/pair maintains its own entry price for the asset, independent of the same asset held in other pairs.
Hyperliquid PnL Model (Asset-Level Accounting)
Hyperliquid aggregates all exposures of the same asset across all pairs and maintains a global average entry price for that asset. Any close uses this global average entry to compute PnL.
Example
A user opens the same asset in four different pairs:
ASSET/OTHER-ASSET-A
149.47
33.446
ASSET/OTHER-ASSET-B
148.79
33.613
ASSET/OTHER-ASSET-C
147.61
33.879
ASSET/OTHER-ASSET-D
146.93
34.020
Hyperliquid computes a global average entry price:
If the user closes only ASSET/OTHER-ASSET-C at 34.298:
Pear uses the pair-specific entry (33.879).
Hyperliquid UI uses the global entry (33.74).
Different entry references lead to different displayed PnL for the same close.
Last updated