Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mobula.io/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Mobula routes perp orders to two DEXes today: Lighter and Gains Network. Each one has its own fee model — values below are taken directly from the protocols’ public fee documentation.

Lighter

Orderbook DEX. Free for Standard accounts; staking-tier maker/taker fees for Premium.

Gains Network

Leveraged trading. Opening + closing fees on leveraged size, plus spread and borrowing fees.

Lighter

Lighter is an on-chain orderbook. Fees depend on account type and, for Premium, on the amount of LIT staked.

Standard Account (default)

0% maker / 0% taker. All markets, perpetuals and spot. No fee at all.
MakerTakerTaker latencyMaker latencyCancel latency
Standard0%0%300 ms200 ms200 ms

Premium Account (opt-in)

Premium unlocks lower latency and better cancel/post-only behavior, in exchange for a fee. Fees scale down with staked LIT:
Staked LITMakerTakerTaker latency
00.0040%0.0280%200 ms
1,0000.0039%0.0273%195 ms
3,0000.0038%0.0266%190 ms
10,0000.0036%0.0252%180 ms
30,0000.0034%0.0238%170 ms
100,0000.0032%0.0224%160 ms
300,0000.0030%0.0210%150 ms
500,0000.0028%0.0196%140 ms
Staking discount is applied at the L1 address level — main account and sub-accounts share the same tier based on combined stake.

Example — Lighter Premium, 0 staked LIT

Open a $10,000 notional position as a market taker:
Notional      = $10,000
Taker fee     = 0.028%
Fee paid      = $10,000 × 0.00028 = $2.80
Same trade as a maker (resting limit order):
Notional      = $10,000
Maker fee     = 0.004%
Fee paid      = $10,000 × 0.00004 = $0.40
Same trade on a Standard account: $0.
Standard is free, so it’s the default for most flow. Premium is opt-in for traders who need lower latency and the volume quota program, and pay the maker/taker fee in exchange.
Full Lighter fee documentation →

Gains Network

Gains charges fees on the leveraged position size (collateral × leverage), not on collateral. Four components on every trade:
  1. Opening fee — taken when the trade opens
  2. Spread — applied to the price (fixed + dynamic / price impact)
  3. Borrowing fee — accrued per block while the trade is open
  4. Closing fee — taken when the trade closes

Opening + Closing fees by asset class

Asset classOpeningClosing
Crypto (core: BTC, ETH)0.05%0.05%
Crypto (non-core)0.06%0.06%
Forex (major)0.012%0.012%
Forex (minor)0.016%0.016%
Forex (exotic)0.02%0.02%
Commodities Tier 1 (Gold)0.05%0.05%
Commodities Tier 2 (Silver, Oil, Pd, Pt)0.08%0.08%
Stocks0.07%0.07%
Indices0.05%0.05%

Spread

  • BTC, ETH: 0% fixed spread (only dynamic spread applies)
  • Other crypto: dynamic spread only, function of open interest and 1% market depth
  • Forex / Commodities: fixed spread per pair (0.01% major, 0.04% tier 2 commodities, etc.)
Dynamic spread formula:
dynamic_spread (%) = (OI_side + new_position_size / 2) / depth_1pct

Borrowing fee

Charged per block on total position size, scales with how lopsided the pair’s open interest is:
feePerBlock = baseFeePerBlock × (effectiveOi / maxOi) ^ exponent
Pairs with very long-skewed (or short-skewed) OI charge more on the dominant side. Balanced books charge less.

Example — Long ETH/USD on Gains

Setup:
Collateral    = 250 USDC
Leverage      = 10x
Position size = 2,500 USDC
Asset         = ETH (core crypto, 0.05% open / 0.05% close)
Entry price   = 3,003.19 (assume 0% fixed spread for ETH)
Opening fee:
2,500 × 0.05% = 1.25 USDC
Net collateral after fee = 248.75 USDC
Net position size        = 2,487.50 USDC
Dynamic spread (assuming 100k long OI and 8M depth):
dyn_spread = (100,000 + 2,487.50 / 2) / 8,000,000 = 0.0126%
opening price = 3,003.19 × (1 + 0.000126) ≈ 3,003.57
Trade goes up 1%, close at 3,033.6:
PnL gross   = 2,487.50 × 1% = 24.88 USDC
Closing fee = 2,487.50 × 0.05% = 1.24 USDC
Borrowing   = ~0.5 USDC (depends on duration / OI imbalance)

PnL net     = 24.88 - 1.24 - 0.5 = 23.14 USDC
Final out   = 248.75 + 23.14 = 271.89 USDC
So on a 250 USDC × 10x trade closed at +1%, the trader pockets 21.89 USDC out of the ~25 USDC raw move — total fees (open + close + borrowing) ≈ 3 USDC, or ~12% of gross PnL at this size.
Liquidation prices on Gains tighten over time as borrowing fees accrue. See the Gains liquidation thresholds tables for exact thresholds per asset class and leverage.
Full Gains Network fee documentation →

Quick comparison

Lighter (Standard)Lighter (Premium, 0 LIT)Gains (core crypto)
Open fee0%0.028% taker / 0.004% maker0.05%
Close fee0%0.028% taker / 0.004% maker0.05%
Spread0 (orderbook)0 (orderbook)Fixed (per asset class) + dynamic
Borrowingn/an/aper-block, OI-skew-based
Use /2/perp/quote to preview fees and slippage on either DEX before committing the trade — it returns a fee breakdown for the venue your order would route to. Pair it with the Perp DEX Status endpoint to confirm the upstream is healthy before routing.

Perpetuals APIs Overview

Supported exchanges and capability map.

Get Perp Quote

Preview fills, fees and venue routing.

DEX Status

Lighter / Gains uptime, probe results and maintenance windows.

Perp Execution Flow

Build → execute flow against Lighter and Gains.