Portfolio P&L
Upshift calculates profit and loss (P&L) for each vault position. This page explains the calculation, its data sources, and its limits.
Summary
P&L measures the difference between assets deposited into and withdrawn from Upshift. Transfers and collateral pledges on third-party protocols are not tracked. These actions can make P&L incorrect for that position.
Formula
Total deposited
Sum of every vault deposit at face value. One deposited unit counts as one unit, with no live re-quote. Any entry fee reduces the shares a deposit receives. The fee is therefore counted as a P&L cost automatically.
Total withdrawn
Sum of every completed withdrawal, converted from shares to assets at the share price when the withdrawal is read.
Current position value
The wallet's live on-chain balance: shares times the current share price. This is what the position is worth if closed at that time.
Upshift shows P&L in the vault's native asset. It also shows a USD value and percentage, using the underlying asset's live USD price.
What counts as a deposit or withdrawal
Only activity Upshift can see and index counts toward the calculation:
On-chain deposits and withdrawals, including instant and request/claim flows, against the vault contract.
Cross-chain LayerZero deposits and redeems for vaults that support them.
Multi-asset deposits, tracked using each asset's own decimals, then rescaled to the vault's reporting decimals.
For example, a vault accepting USDC with 6 decimals and RLUSD with 18 decimals sums both correctly.
What P&L does not track
OUT OF SCOPE
Receipt tokens are transferable ERC-20 tokens. A wallet can receive shares through direct transfer. It then has no Upshift deposit record or cost basis. Upshift cannot compute P&L correctly for that position.
If a wallet moves receipt tokens to another protocol as collateral, Upshift cannot see that activity. The position value can change for reasons the calculation cannot see or attribute.
P&L reflects Upshift-native deposit and withdrawal history plus the current on-chain balance. It excludes off-platform activity.
Safeguard: refusing to show a fabricated number
A wallet with a non-zero position can have empty deposit and withdrawal history. This can occur during an indexing failure. The formula would then report the entire position as 100% profit: a plausible-looking but wrong result.
Upshift detects this case and returns History unavailable instead of a number. It does not silently show inflated P&L.
This safeguard does not fully cover transferred shares. A wallet that received shares directly also has no history. It shows History unavailable until Upshift can distinguish that flow from an indexing gap.
Edge cases
Fully exited, then re-entered
Computable. Withdrawal records confirm that the history loaded, even with a zero current balance.
Zero position, no history
Reports zero P&L.
Cross-chain vaults
Includes remote-chain deposits, redeems, and receipt-token balances in current position value and total withdrawals.
Closed vaults
Appears only when the position remains in the portfolio list. The position must surface there before Upshift can show P&L.
Data sources
Current balances and share prices come from live on-chain reads.
Deposit and withdrawal history comes from indexed events. Sources include subgraph-indexed events and the newer history API for closed-vault records.
When indexing is incomplete or stale, a live position without indexed history shows as History unavailable. This safeguard cannot detect every indexing gap. A position with some indexed deposits can still be affected by unrelated missing history.
Last updated
