Appearance
Fees and PnL
Every fee
| Fee | Current value | When | Who pays | Where it goes |
|---|---|---|---|---|
| Opening fee | None | — | — | — |
| Funding or borrow fee | None | — | — | — |
| Spread or price impact on entry/exit | None | — | — | — |
| Win haircut | 7.7% base, more on small moves, 0.31 bp deadband (formula) | Every winning close | Reduces your win | Stays in the house |
| Payout fee | 2% (fee_bps = 200) of the haircut win | Each payment of a win, whether immediate or a queue payment | Deducted from what you receive | Fee split below |
| Loss fee | 2% of the realized loss | Losing closes and liquidations, only while the payout queue is empty | Taken out of your loss on the house side; you never pay more than the loss | Fee split below |
| Execution fee | 500,000 lamports (0.0005 SOL) per request | Every open or close request | You, in SOL | Whoever posted the pinned Pyth update. If the request expires: ¼ to the canceller, ¾ back to you. |
| Account rent | ≈ 0.0016–0.0022 SOL per account | When accounts are created | You, in SOL | Refundable, except the trading account's (details) |
| Deposit or withdrawal fee | None | — | — | — |
Fee split. staker_share_bps is 5000, so stakers get floor(fee × 50%) and the rest goes to dev_fees. The staker share streams to $KAMI stakers in USDC ($KAMI). The admin can withdraw dev_fees, but only up to the amount accrued.
All fee rates are governance parameters. fee_bps can never exceed 1000 (10%). The fee on a queued win is taken when it is paid, at the fee_bps in force at that moment.
How a close settles
Notation: amounts are in USDC base units (6 decimals) and prices have 8 decimals.
dist = |exit − entry|
favourable = (exit > entry) for a long, (exit < entry) for a shortThe program evaluates these cases in order:
- Bust. If the exit price is at or past the bust price, the close settles as a liquidation:
returned = 0, and the whole margin is lost no matter what the raw loss is. This applies to your own close too (Liquidation). - Loss (unfavourable move):The house receives
raw_loss = ceil(notional × dist / entry) loss = min(raw_loss, margin) returned = margin − lossloss − floor(loss × 2%)and the fee is split. If the queue is active, the fee is waived and the whole loss goes to the house's side bucket. Either way the trader losesloss. - Win (favourable move, or no move):
raw_pnl = floor(notional × dist / entry) adjusted = haircut(notional, entry, dist)adjusted = 0(the move is inside the deadband):returned = margin.- The queue is empty and the treasury holds at least
adjusted:fee = floor(adjusted × 2%),returned = margin + adjusted − fee. - Otherwise the win is queued:
returned = marginnow, plus a payout-queue claim foradjusted. Each paymentpon the claim creditsp − floor(p × fee_bps / 10000), at thefee_bpsin force whenpis paid (The house).
$KAMI rewards ($KAMI): only losing closes earn. A loss counts in full (the fee included), and a liquidation its full margin, and earns at the current rate on the halving schedule (1,400 per $1 for the first $250,000 of counted losses). The tokens are credited at the close, or owed until a lock release backs them. A winning close earns nothing, whether it is paid now, queued or inside the deadband. A close with zero raw PnL earns nothing.
returned is credited to your available balance (trading balance), not your wallet. Your margin is always returned in full on a winning close; only the win itself can queue.
Every close emits a PositionClosed event with exit, raw_pnl, adjusted, returned, queued (the claim amount), fee, its reward (reward_weight, the counted loss; reward_tokens; reward_backed, the part credited at once; reward_cum_loss, the running total after it) and kind: 0 = loss, 1 = win, 2 = liquidation, 3 = settled at a retired market's final price.
Your net PnL is returned − margin, plus later queue payments. Loss amounts round up, and win amounts and $KAMI reward shares round down.
Worked examples
All examples use current parameters: BTC long, entry $100,000, margin $1,000, 10x leverage, notional $10,000.
Win: exit $101,000 (+1%), queue empty
| Raw PnL | 10,000 × 1,000 / 100,000 = $100.000000 |
| Haircut win | 10,000 × (0.01 − 0.000031) × 0.923 × 0.01 / 0.010185 = $90.342533 |
| Payout fee | floor(90.342533 × 2%) = $1.806850 (stakers $0.903425, dev $0.903425) |
| Returned | 1,000 + 90.342533 − 1.806850 = $1,088.535683 |
| Net PnL | +$88.535683 (88.5% of raw) |
| House treasury | −$90.342533 |
| $KAMI reward | None: winning closes don't earn |
Same win while the queue is active (or the treasury holds less than $90.342533): you get $1,000 back now and a claim for $90.342533. Paid in a single payment at a 2% fee, it nets $88.535683. Paid in several installments, it can net slightly more, because each installment's fee rounds down separately: for example $45.171284 + $45.171249 nets $88.535684.
Small win: exit $100,050 (+5 bps): raw $5.000000, haircut win $3.159759, fee $0.063195, net +$3.096564 (61.9% of raw).
Deadband win: exit $100,002 (+0.2 bps): raw $0.200000, haircut win $0 (inside the 0.31 bp deadband), so you get your margin back with no gain.
Loss: exit $99,000 (−1%), queue empty
| Loss | ceil(10,000 × 1,000 / 100,000) = $100.000000 |
| Returned | $900.000000 |
| Loss fee | $2.000000 (stakers $1, dev $1), taken from the $100 |
| House treasury | +$98.000000 |
| $KAMI reward | $100 × 1,400 = 140,000 $KAMI at the first rate (unreferred; 147,000 if referred). A close that crosses a halving pays each rate on its own part |
Loss bigger than the margin: a loss is capped at the margin. But at the bust price, which is before zero equity, the position settles as a liquidation anyway (Liquidation).