Fees: spread, skew, borrow, impact
Exact formulas for every cost a position pays, the parameters this app's markets use, and worked examples.
All costs go to the market's LP vault, except 50% of the taker fee and of the LP deposit and withdrawal fees, which goes to the protocol. Every rounding goes against the trader and in favour of the vault. Rates below are per second in units of 10⁻¹² (on-chain FUNDING_SCALE is 10¹²); one contract is 10⁶ base units of collateral.
Market parameters in this app
| Parameter | Value | Meaning |
|---|---|---|
im_bps / mm_bps | 1000 / 500 | 10% initial margin (10× max), 5% maintenance, of the amount at risk (size × p long, size × (1 − p) short) |
liq_fee_bps | 100 | Liquidation bounty: at most 1% of the amount at risk, paid from what is left of the margin |
taker_fee_bps / protocol_share_bps | 10 / 2000 | 0.2% of notional; 50% of it to the protocol |
half_spread / max_conf | 2000 / 20000 | 0.2¢ minimum spread; no opens while confidence is wider than 2¢ |
min_price / max_price | 20000 / 980000 | Opens only between 2¢ and 98¢ |
max_funding_rate | 3170 | Skew fee at full imbalance: about $0.10 per contract per year |
skew_scale | 10¹² (1,000,000 contracts) | Imbalance at which skew fee and impact reach full strength |
impact_ppm | 1,000,000 | A contract added beyond the skew scale pays its whole remaining upside |
borrow_rate_base / borrow_rate_slope / borrow_util_kink | 0 / 20000 / 800000 | No borrow below 80% utilization; about 63% a year on the cap at 100% |
max_oi_per_side / min_margin | 10¹³ / 10⁶ | 10,000,000 contracts per side; $1 minimum margin |
lp_deposit_fee_bps / lp_withdraw_fee_bps | 5 / 20 | 0.05% of an executed LP deposit, 0.2% of an LP withdrawal (waived after resolution); each capped at 5%, split with the protocol like the taker fee, the rest stays with the remaining LPs |
max_oracle_lag / max_price_age | 30 s / 120 s (simulator), 300 s (local), 900 s (testnets) | Oldest observation a print may carry; oracle silence after which orders can be cancelled |
Spread and taker fee
spread = max(half_spread, conf)
open long = min(p + spread, 1) close long = max(p − spread, 0)
open short = max(p − spread, 0) close short = min(p + spread, 1)
taker fee = ceil(size × exec_price × taker_fee_bps / 10⁴)Example: 10,000 contracts long at a 50¢ print fill at 50.2¢. Notional is $5,020 and the taker fee is $10.04. The spread costs you $20 against mid on the way in, and the same again on the way out.
Skew fee (funding)
rate (per contract, per second) = max_funding_rate × min(|long_oi − short_oi|, skew_scale) / skew_scale [× 10⁻¹²]Only the majority side pays, to the vault; the minority neither pays nor receives. That keeps the vault's liabilities equal to the reserve, and the fee pushes the book toward balance. At full imbalance, 3170 × 31,536,000 s / 10¹² ≈ $0.09997 per contract per year, about 10% of a $1 contract's notional.
Borrow fee and the kink
Every open position locks its profit cap in the vault. It pays a borrow fee on that cap:
util = max(long side reserve, short side reserve) / vault (0…100%)
rate = borrow_rate_base + (util ≤ kink ? 0 : borrow_rate_slope × (util − kink) / (1 − kink)) [× 10⁻¹² per second]
fee = ceil(cap × rate × seconds)Utilization counts only the larger side, so a hedged long+short pair does not double it. With a base rate of 0 and an 80% kink, capital is free until it is scarce, so longshots (whose cap is many times their margin) cost the same as buying the outcome. At 90% utilization the rate is 10,000, or 31.5% a year on the cap; at 100% it is 20,000, or 63.1% a year.
Example: a position with a $100 cap held 30 days at 90% utilization pays 100 × 10,000 × 2,592,000 / 10¹² = $2.59. Borrow settles from margin, which lowers the cap it is charged on, so settling more often (anyone can poke) charges very slightly less and never more.
Price impact
A fill that increases the imbalance |long OI − short OI| pays an impact fee: the integral, over the imbalance it adds, of
marginal impact per contract = impact_ppm/10⁶ × mp × min(|skew|, skew_scale) / skew_scale
mp = 1 − p for long-heavy skew, p for short-heavy skew (what one more contract on that side can still win)Example, from a balanced book at a 50¢ print (mp = 0.5): opening 10,000 contracts long pays 0.5 × 10,000² / (2 × 1,000,000) = $25 (0.25¢ per contract). 100,000 contracts pay $2,500 (2.5¢ each). Beyond 1,000,000 contracts of imbalance every extra contract pays its full 50¢ upside, so it can't profit even if the trader knows the outcome.
- Insiders are bounded. Someone who knows the result before the oracle can take at most about mp × skew_scale / 2 from the vault: $250,000 at 50¢ in this app, less after fees and borrow.
- Splitting doesn't help. The fee depends only on where the imbalance starts and ends, and rounds up per fill, so ten small orders pay at least as much as one big one. Routing through a second account (open the other side first, then close it) pays more, not less.
- Rebalancing is free. Fills that reduce the imbalance pay no impact. Impact is priced on the upside of the side it grows, so closing a short at 95¢ (upside 5¢) costs little.