Sub topic 15
Futures and Perpetuals: Funding and Other Costs
This chapter assumes you know how maker and taker fees work, how to read basis points, and what a spread is. You should also know what leverage and margin mean in general terms. The Python snippets are short and optional. Every rate below is illustrative, because each venue publishes its own schedule.
What Changes With Derivatives
A futures contract is an agreement to buy or sell an asset at a price set now, for settlement later. A perpetual future (a "perp") has no settlement date. You open a position with a small deposit called margin and gain exposure to a much larger position. You never take delivery of the coin.
Everything from earlier chapters still applies. You pay a maker or taker fee, you cross a spread, and you suffer slippage if your order is big. Derivatives add three costs on top:
- Fees charged on the full position size, not on your margin.
- Funding payments between traders while the position is open.
- Liquidation costs if the position loses too much value.
Fees Are Charged on Notional
Notional is the full value of the position: size times price. A 5x position of 10,000 USDT uses only 2,000 USDT of margin, but the fee is calculated on 10,000. Leverage does not lower the fee. It raises the fee as a percentage of your own capital.
Derivatives fee schedules usually have their own maker and taker rates, often lower than spot, and their own volume tiers. You pay the fee when you open and again when you close, so a round trip has two fees.
Funding Rates
A perpetual has no expiry date to pull its price toward the underlying asset. Instead, exchanges use a funding rate: a periodic payment between traders. No funding payment goes to the exchange.
- When the rate is positive, perp prices are above the index price. Longs pay shorts.
- When the rate is negative, longs receive payment and shorts pay.
- The payment equals position notional times the funding rate.
Many venues settle every 8 hours. Others settle hourly, and some adjust the interval during volatile periods. Check the interval before you annualize a rate. You owe funding only if your position is open at the settlement timestamp. A position opened just after a timestamp and closed just before the next one pays nothing.
Funding is neither a fee nor a penalty. It is a transfer between traders. For a trader on the crowded side of the market, it works like a running cost of holding the position.
Estimating a Holding Cost
The script below adds the trading fees and the funding cost of a 5x long held for 7 days, at 5 bps taker fees and a constant 0.01% funding rate per 8-hour interval.
def fee(notional, rate_bps):
return notional * rate_bps / 10_000
def funding_paid(notional, rate_per_interval, intervals, side="long"):
# Positive result means you pay; negative means you receive.
sign = 1 if side == "long" else -1
return sign * notional * rate_per_interval * intervals
notional = 10_000.0
leverage = 5
margin = notional / leverage
trading = 2 * fee(notional, 5) # open and close, both as taker
funding = funding_paid(notional, 0.0001, 3 * 7) # 3 intervals a day for 7 days
total = trading + funding
print(round(margin, 2), round(trading, 2), round(funding, 2), round(total, 2))
print(round(total / notional * 10_000, 1), "bps of notional")
print(round(total / margin * 100, 2), "% of margin")The result is 2000 of margin, 10 in trading fees, and 21 in funding, for a total of 31. That is 31 bps of notional but 1.55% of your margin. A funding rate of 0.01% per 8 hours looks tiny, yet it annualizes to about 10.95% (0.0001 × 3 × 365). Positions held for weeks are therefore much more sensitive to funding than to fees.
Dated Futures: Basis Instead of Funding
A futures contract with an expiry date has no funding payments. The price difference between the future and the spot price, called the basis, shrinks to zero as expiry approaches. If the future trades above spot, buying it means paying that premium. The premium disappears as the contract converges to spot.
You can treat the basis as an implied financing cost. A premium of 1% for a three-month contract is roughly 4% a year. Compare that with the funding rate on a perpetual before you choose between them.
Liquidation Costs
If your losses reduce your margin below the maintenance requirement, the exchange closes your position by force. This is liquidation. It costs you in several ways:
- You lose some or all of the margin in that position.
- Many venues charge a liquidation fee, often a percentage of notional. It goes to an insurance fund that covers losses when a position closes at a bad price.
- The forced close is a market order, so you pay the spread and slippage at the worst moment.
- On some venues, auto-deleveraging (ADL) can close a profitable position against your will when the insurance fund runs out.
For an isolated long, you can estimate the liquidation price like this. It ignores fees and funding, and each venue uses its own formula, so treat it as approximate.
def approx_liq_price_long(entry, leverage, maintenance_margin_rate):
return entry * (1 - 1 / leverage + maintenance_margin_rate)
print(round(approx_liq_price_long(100.0, 5, 0.005), 2)) # 80.5At 5x leverage with a 0.5% maintenance rate, a long entered at 100 liquidates near 80.5. That is a fall of only 19.5%. At 20x the same formula gives 95.5, a fall of only 4.5%.
Other Costs to Watch
- Mark price versus last price. Liquidations and unrealized profit use the mark price, a smoothed estimate that resists manipulation. The last traded price can differ from it, so your position can be liquidated while a chart shows a price that looks safe.
- Thin books. Less liquid contracts have wider spreads and deeper slippage, as in the order book chapters.
- Borrowing and collateral. Margin held in a volatile coin can lose value on its own. Some venues apply haircuts to collateral or charge interest on borrowed funds.
- Settlement and withdrawal. Moving profit off the exchange still triggers the network and withdrawal fees covered earlier.
Comparing Venues and Order Types
| Cost | When you pay it | Depends on |
|---|---|---|
| Maker or taker fee | At open and close | Notional, fee tier |
| Spread and slippage | When you cross the book | Depth of the order book |
| Funding | At each interval while open | Notional, rate, your side |
| Basis (dated futures) | Built into the entry price | Time to expiry |
| Liquidation fee | Only if liquidated | Notional, venue rules |
To compare two venues, convert every line to basis points of notional for your expected holding time. A venue with lower taker fees can still cost more if its funding runs higher or its book is thinner. If you often hold overnight, funding usually matters more than a 1 bp difference in fees.
Worked Checklist
- Compute the entry and exit fees on notional.
- Estimate the spread and slippage for your size on both sides.
- Multiply notional by the current funding rate and the number of settlements you will cross.
- Check how far the liquidation price sits from your entry, and choose leverage that leaves room.
- Add the figures and divide by notional, then by margin, to see both views of the cost.
Exercise
You hold a 10x long on a perpetual with notional 20,000 USDT for 4 days. Taker fee is 4 bps each way, the funding rate is a constant +0.01% every 8 hours, and you ignore spread and slippage. What is the total cost in USDT, and what percentage of your margin is that?
Show answer
Margin is 20,000 / 10 = 2,000 USDT. Fees: 2 × 20,000 × 4 / 10,000 = 16 USDT. Funding: 4 days × 3 intervals = 12 payments, each 20,000 × 0.0001 = 2 USDT, so 24 USDT. Total cost is 40 USDT, which is 2.0% of margin (20 bps of notional).
Exercise
Why can a position opened 1 minute after a funding timestamp and closed 1 minute before the next one pay no funding at all?
Show answer
Funding is settled only at the scheduled timestamps and only for positions open at that moment. A position that closes before the next timestamp never crosses a settlement, so no payment is charged or received.