How to calculate profit or loss
Last updated
Was this helpful?
Last updated
Was this helpful?
Bellows are two examples to illustrate how we calculate profit or loss using SDP trading mode.
Example 4: Assuming two users A and B, A generates $100 rBTC, and B generates $100 rUSD, the respective debt ratio is 50%, and the total system debt is $200. Suppose the price of BTC rises by 50%, so the value of rBTC held by A becomes $150, and the value of rUSD held by B is still $100. At this time, the total system liability becomes $150+$100=$250. Note that because the debt ratio has not changed, Aās debt is $250*50%=$125, and Bās debt is also $125. Therefore, it can be calculated that the profit or loss of A is $150-$125=$25, and the profit or loss of B is $100- $125=-$25. The sum of all users' profit and loss in the entire system is 0, which is similar to a traditional contract trading system.
It should be noted that although B did nothing after generating rUSD, he/she still lost money due to the increase in the price of BTC. This is because rUSD is generated, which by default is equivalent to becoming a long position in the U.S. dollar (in this case, it is also equivalent to a short position in BTC)! We define this loss as "crafting loss".
Example 5: Suppose that following the assumption in example 4, now A holds $150 rBTC, and B holds $100 rUSD. Now suppose that there is a new user C, who generates rUSD of $100, and calculates the new debt ratio. Note that the total debt of A and B is now $250 instead of $200 in the initial state! Therefore, after C's operation, the total debt of the system becomes $350. The ratio of A is $125/$350=35.71%, the ratio of B is $125/$350=35.71%, and the ratio of C is $100/$350=28.57%.