Docs / Trading

Wins and losses(04)

When a position closes, the program compares the fill price with your entry: rawPnl = size × (exit − entry) / entry, with the sign flipped for a short. A positive result is a win; anything else is a loss.

Your margin always comes back

On every close that is not a liquidation, your margin returns to available in the same transaction, less any loss. Only profit can be queued.

A winning close, step by step

  1. 01Deadband. The gain is computed as if the exit were entry / 50,000 (0.2 basis points) less favourable. If no gain is left, you get your margin back and nothing else: no loss, no fee, no paper.
  2. 02Impact. The deadbanded gain is multiplied by a kept share that grows with the size of the move, up to 0.9. See The impact curve.
  3. 03Profit cap. The result is capped at 10 times your margin.
  4. 04Win fee. 2 % of the capped gain. What remains is your net profit.
  5. 05Payment. If the queue is empty and the house holds enough, you are paid now. Otherwise, see below.

When the house cannot pay

  • Queue empty, house holds enough: the house pays net + fee; you receive net and the fee is distributed.
  • Queue empty, house short: the house pays what it holds now, the rest of net goes to the back of the queue line, and no fee is charged.
  • Queue already open: the whole net is queued behind earlier winners and no fee is charged. Nothing jumps the line.

A queued amount is a claim. It is paid in order as losses and donations arrive. You collect whatever part has been paid from the trade page, at any time.

A losing close

loss = −rawPnl. You receive margin − loss immediately. Then:

  • Queue empty: a 2 % loss fee is charged and distributed, the house keeps loss − fee, and you mint paper on loss − fee.
  • Queue open: no fee is charged; the whole loss flows to the front of the queue line first, and you mint paper on the whole loss.

A worked win

BTC long, $100 margin at 20x, so a $2,000 position. Entry $80,000. The close fills at $80,800, a 1 % move.

BTC LONG, $100 AT 20X
StepValue
Raw gain$2,000 × 1 % = $20.00
Deadbanded exit$80,800 − $80,000 / 50,000 = $80,798.40
Deadbanded gain$2,000 × 0.998 % = $19.96
Kept share at a 0.998 % BTC move0.8832
After impact$17.63
Profit cap, 10 × $100not reached
Win fee, 2 %$0.35
Net profit$17.28
Back to you$117.28 if the house can pay; otherwise $100 now and a claim for the unpaid part

A worked loss

Same position. The close fills at $79,200, a 1 % move against you. The queue is empty and the house holds less than $25,000.

BTC LONG, $100 AT 20X
StepValue
Loss$2,000 × 1 % = $20.00
Back to you$80.00
Loss fee, 2 %$0.40: $0.20 to paper holders, $0.20 to the treasury
Kept by the house$19.60
Paper minted to you$19.60 × 100 = 1,960 paper

Your 1,960 paper now earns a share of every future fee and surplus, in proportion to all paper outstanding. See Paper and the mint curve.