2. Calculating Long PNLs
Once the Protocol receives the price of th asset, it calculates the PNLs (Profits and Losses) for Long positions. Longs, as the name suggests, bet on the rise of the asset's price. Therefore, if the price has increased since the last Protocol update, Longs make a profit. The Protocol then transfers this profit from the Vault Side to the Long positions, specifically to their Collateral, which represents the portion of the position that the user can withdraw.
Conversely, if the price of the asset decreases, Longs incur a loss. The Protocol then transfers this loss from the Long positions to the Vault Side, reducing the Longs' Collateral. This mechanism automatically adjusts positions based on market movements, ensuring a fair distribution of gains and losses.
The next step is to apply the Funding Rate, which we will detail in the following section.
Last updated