WINS AND LOSSES
//01_ TWO QUANTITIES
move = |exit - entry| / entry rawPnl = size x (exit - entry) / entry (sign flipped for a short)
The exit is the fill price of your close request. A close is one of three things:
- a winning close when
rawPnlis positive; - a losing close when
rawPnlis zero or negative and the exit has not reached the bust price; - a liquidation when the exit is at or beyond the bust price, whoever triggered it.
All amounts are in USDG base units (6 decimals) and all prices have 8 decimals. Every rounding goes in the house's favour: gains round down, losses round up, by one base unit at most.
//02_ A WINNING CLOSE
- 01Deadband. The gain is computed as if the exit were less favourable by
entry / 50,000(0.2 bps). If that gain is zero or less, you get your margin back and nothing else: no loss, no fee, no paper. - 02Impact haircut. The deadbanded gain
gis multiplied by a scale between 0 and 0.9 that depends on the move and the market. See the impact curve. - 03Profit cap. The result is capped at 10 times the margin.
- 04Win fee. 2% of the capped amount. What is left is the net gain.
- 05Margin back. Your margin returns to
availableimmediately, in every case. Only profit can wait. - 06Payment. The house pays the net gain now, queues it, or pays part and queues the rest, depending on its state (section 04).
//03_ WORKED EXAMPLE: A WIN
- //MARKET_
- BTC
- //SIDE_
- long
- //MARGIN_
- $100.00
- //LEVERAGE_
- 10x
- //SIZE_
- $1,000.00
- //ENTRY_
- $100,000.00
- //EXIT_
- $101,000.00 (+1%)
rawPnl = 1,000 x (101,000 - 100,000) / 100,000 = $10.00 deadband = 100,000 / 50,000 = $2.00 exit' = 101,000 - 2 = $100,998.00 g = 1,000 x (100,998 - 100,000) / 100,000 = $9.98 move = 998 / 100,000 = 0.998% term1 = 1 / (0.00998 x 15,000) = 0.0066800 term2 = 100,000 / (1,000,000 x 0.00998 x 814.598) = 0.0123006 scale = (1 - 0.10) / (1 + 0.0066800 + 0.0123006) = 0.8832356 adjusted = 9.98 x 0.8832356 = $8.814691 cap = 10 x 100 = $1,000.00 (not reached) fee = 2% x 8.814691 = $0.176293 net = 8.814691 - 0.176293 = $8.638398
If the house has the cash and nobody is queued, you end with $108.638398 in available: the $100 margin plus the $8.638398 net gain. The house's cash falls by $8.814691, the net gain plus the fee. The fee is split in two: $0.088146 to paper holders and $0.088147 to the treasury (the paper share rounds down, the treasury takes the remainder).
The raw gain was $10.00. The deadband took $0.02, the haircut $1.165309 and the fee $0.176293. On larger moves the haircut shrinks towards its floor of 10%.
//04_ WHO PAYS A WIN
The same win, settled against three different houses:
| HOUSE STATE | PAID NOW | QUEUED | FEE CHARGED |
|---|---|---|---|
| Queue empty, cash of $8.814691 or more | $8.638398 | $0.00 | $0.176293 |
| Queue empty, cash of $4.00 | $4.00 | $4.638398 | none |
| Queue open (cash is then always $0) | $0.00 | $8.638398 | none |
- Queue empty, enough cash (cash at least net plus fee): the net gain is paid now and the fee is distributed.
- Queue empty, not enough cash: the house pays what it has, up to the net gain, and the rest joins the end of the queue line.
- Queue open (someone is already waiting): the whole net gain is queued behind them. Earlier winners come first.
In the last two cases no fee is distributed. Your claim is still the net amount: the 2% is withheld from it and stays in the house instead of going to paper holders and the treasury. The $100 margin is returned at once in all three cases. How the queue is paid is described in the house and the queue line.
//05_ A LOSING CLOSE
The loss is -rawPnl, which is less than the margin as long as the bust price has not been reached. You receive margin - loss in available immediately. Losses carry no haircut.
- Queue empty: a fee of 2% of the loss is distributed, the rest of the loss goes to the house's cash, and your paper basis is the loss minus the fee.
- Queue open: no fee. The whole loss is an inflow that pays queued winners first, and your paper basis is the whole loss.
Same position, closed at $99,000.00 (-1%): rawPnl = -$10.00, and $90.00 comes back to you.
| QUEUE EMPTY | QUEUE OPEN | |
|---|---|---|
| Returned to you | $90.00 | $90.00 |
| Fee | $0.20 ($0.10 + $0.10) | none |
| To the house | $9.80 to cash | $10.00 to the queue first |
| Paper basis | $9.80 | $10.00 |
| Paper minted at 100 per $1 | 980 | 1,000 |
The paper rate of 100 per $1 applies while net house equity is under $25,000. Above that it declines; see paper and the mint curve.
//06_ LIQUIDATION
This position's bust price is $90,050.00 (entry x (1 - (1/10 - 0.0005))). If a fresh price at or below it reaches the contract, through a liquidation or through a close that fills there, the whole $100 margin is lost. The liquidator receives nothing.
| QUEUE EMPTY | QUEUE OPEN | |
|---|---|---|
| Returned to you | $0.00 | $0.00 |
| Fee (2% of the margin) | $2.00 ($1.00 + $1.00) | none |
| To the house | $98.00 to cash | $100.00 to the queue first |
| Paper basis | $100.00 (full margin) | $100.00 |
| Paper minted at 100 per $1 | 10,000 | 10,000 |
A liquidation is a hard bust. Closed at $90,060.00, the same position loses $99.40 and returns $0.60. At $90,050.00 it returns nothing. The paper basis on a liquidation is always the full margin, fee or not. More in liquidation and the bust buffer.
//07_ THE DEADBAND AT WORK
The same long, closed just above the entry:
| EXIT | RAW PNL | DEADBANDED GAIN | SCALE | YOU RECEIVE |
|---|---|---|---|---|
| $100,001.00 | $0.01 | $0.00 | $100.00 (margin only) | |
| $100,010.00 | $0.10 | $0.08 | 0.267234 | $100.020951 |
| $101,000.00 | $10.00 | $9.98 | 0.883236 | $108.638398 |
On a 1 bp move the haircut keeps about a quarter of the gain; the fee then takes 2% of what is left. A position opened and closed within a few cents of the same price is a cost, not a trade.
//08_ THE PROFIT CAP
A BTC long with $100 margin at 100x ($10,000 notional), entered at $100,000.00, with a bust price of $99,050.00 that the price never reaches:
| EXIT | G | SCALE | ADJUSTED | FEE | YOU RECEIVE |
|---|---|---|---|---|---|
| $101,000.00 | $99.80 | 0.883236 | $88.146916 | $1.762938 | $186.383978 |
| $110,000.00 | $999.80 | 0.898298 | $898.118384 | $17.962367 | $980.156017 |
| $112,000.00 | $1,199.80 | 0.898581 | $1,000.00 (capped) | $20.00 | $1,080.00 |
At $112,000.00 the adjusted gain would be $1,078.12; the cap at 10 times the margin holds it to $1,000.00. At 10x the cap needs a move of about 111% in your favour, so in practice it binds only at high leverage.
//09_ SHORTS
A short is the mirror image. A BTC short with $100 margin at 10x, entered at $100,000.00 and closed at $99,000.00, settles with exactly the numbers of section 03: g = $9.98, adjusted = $8.814691, net = $8.638398. Its bust price is $109,950.00.
Credits: hands from Michelangelo, The Creation of Adam (detail), public domain, via Wikimedia Commons. Marks of the markets and integrations belong to their owners (sources, credits).