📈PnL Calculations
On the Prerich portfolio page, you will see a percentage displayed next to each coin you own. This percentage represents your Unrealized Profit and Loss (uPNL), indicating the performance of your investment in each token. Here's how we calculate it:
Key Terms:
uPNL (Unrealized Profit and Loss): The profit or loss on your investment that has not yet been realized.
Value: The current value of your tokens measured in Solana.
Initial: The initial amount spent to purchase the tokens, measured in Solana.
Solana Spent: The amount of Solana used to buy the token.
Number of Tokens Sold: The number of tokens in total you have sold.
Initial Token Balance: The number of tokens you hold before this sell transaction.
uPNL Calculation Formula:
This formula helps us determine the unrealized profit or loss as a percentage of the initial investment.
Adjusting Initial Investment:
Depending on whether you are buying or selling tokens, the initial investment amount needs to be adjusted:
If you buy tokens:
The initial investment increases by the amount of Solana spent.
If you sell tokens:
The initial investment is adjusted based on the proportion of tokens sold relative to the initial token balance.
Last updated