Profit, loss and fees
Where every number in the position row comes from.
Nothing is charged to open a position. Three things cost money afterwards: a closing fee taken only out of profit, borrow charged continuously on the pool capital the position ties up, and funding paid by the crowded side of a market to the other. Profit is the price move, scaled by size.
Unrealised profit and loss
Price movement, scaled by size, signed by side.
long: pnl = size x (mark - entry) / entry
short: pnl = size x (entry - mark) / entry
It is unrealised until the position closes: nothing has moved between you and the pool yet. The figure in the row is what you would realise if you closed at the current mark.
The three fees
The protocol charges exactly three things, and none of them at open:
- Closing fee
- Charged once, at close, and only out of profit:
min(size x rate, profit). A losing trade pays no closing fee. Each market has a low and a high rate; you pay the low one when your close leaves the market's long and short exposure more balanced, the high one when it leaves it more skewed. - Borrow
- Charged continuously for the pool capital your position ties up. The rate is vault-wide and rises with the square of utilization:
rate = base + variable x utilization^2, per day. It is charged on the position's risk units, which is its notional scaled by the market's risk factor. - Funding
- Charged continuously to one side of the market and credited to the other, to pull open interest back towards balance. The paying side and the rate come from a slow-moving average of the market's skew, not from the book at this instant, so a side that was crowded an hour ago can still be paying after it thins out. The receiving side gets as much of the flow as its exposure matches; anything left over goes to the pool.
Health, which is all of it at once
health = collateral + unrealised pnl - borrow + funding
Funding is signed: negative while you pay, positive while you receive. Health is the number liquidation compares against the maintenance margin, and it is why a position can be liquidated on a day the price barely moved: fees do not stop while a market is quiet.