USDT Profit and Loss

Before settlement, users can buy and sell the swaps on their own discretion.
RPL is the profit and loss generated from closing positions.
RPL of a swap:
Open long: RPL =( Closing Price –Opening Price) * Face Value * Closed Amount
E.g. User A opened 20 long BTC swaps at the Average Entry Price 5000 BTC/USDT, with 0.01BTC (Cont);then closed 10 swap at 10,000 BTC/USD, the RPL is then = (10000 - 5000) * 0.01*1 0= 500USDT
Open short: RPL =( Average Opening Price –Closing Price) * Face Value * Closed Amount
E.g. User A opened 1000 short BTC swaps at the standard settlement price 5000BTC/USDT, and closed 10 short swaps with the price of 10000BTC/USDT, the RPL is then = (5000 - 10000) *0.01* 10= -500USDT
UPL of a swap:
Open long: RPL =(Latest Marked Price-Average Entry Price) * Face Value* Position Holdings
E.g. User A opened 60 long BTC swaps at the Average Entry Price 5000 BTC/USDT, then latest marked price is 6000 BTC/USDT, the UPL is then= (6000— 5000) * 0.01*60 = 600USDT
Open short: UPL = (Average Entry Price-The Latest Marked Price) * Face Value * Position Holdings
E.g. User A opened 10 short BTC swaps at the standard settlement price 10000 BTC/USDT, then latest marked price is 5000BTC/USDT, the UPL is then =(10000— 5000) * 0.01*10= 500USDT