11 MARKETSUSDG10 S GRIDNEXT FILL 00:10
//14_ Docs

FEES

//01_ EVERY FEE

FEERATECHARGED ONCHARGED WHEN
Win fee2%the gain after the haircut and the capthe win is paid in full from cash
Loss fee2%the lossthe queue is empty
Liquidation fee2%the marginthe queue is empty
Open feenone
Spreadnonefills are at the oracle median
Fundingnonepositions can stay open indefinitely
Deposit, withdrawalnone

Gas is paid to the chain in ETH and is not a Paperhands fee. The impact haircut on gains is not a fee either: nothing is paid to anyone, the house simply pays less (see the impact curve).

//02_ EXAMPLES

//WIN_
$8.814691 adjusted gain: fee $0.176293
//LOSS_
$10.00 loss: fee $0.20
//LIQUIDATION_
$100.00 margin: fee $2.00

These are the figures of the worked BTC example in wins and losses, with an empty queue.

//03_ WHILE THE QUEUE IS OPEN

When winners are waiting in the queue line, no fee is collected:

  • a losing close or a liquidation pays no fee, and the whole loss goes to the queue line;
  • a win is queued at its net amount (the gain minus 2%), and that 2% is not distributed to anyone: it stays in the house.

The same applies to a win that the house can only pay in part: the net amount is paid or queued, and no fee is distributed.

//04_ WHERE FEES GO

Every fee actually charged is split 50/50: half to paper holders through the rewards accumulator, half to an amount owed to the treasury, treasuryOwed. The paper share rounds down and the treasury takes the remainder. The split is a constant of the contract.

withdrawTreasury() is permissionless: anyone can call it, and it always sends the full treasuryOwed to the treasury address, never anywhere else. The keeper calls it once the amount owed is above $50.

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).