Derivatives · Lesson 7 of 8 · 20 min read
Perpetuals and funding
A future with no expiry needs something to hold it to spot. That something is a payment between the two sides of the contract, three times a day — and on a leveraged position it is charged on the whole notional while it comes out of a fraction of it.
- Assumes you have read
- Limit vs market orders,What a trade really costs
- After this you can
- Hold a leveraged position knowing which of the three quoted prices decides each thing that can cost you money.
The BTCUSDT perp, right now
venue premium index, 09:01 UTC
- Funding rate
- +0.0100%
- Mark
- 78,051.8
- Index
- 78,079.2
- Next crossing
- 16:00
longs pay shorts
prices PnL, funding and liquidation
the spot composite it tracks
UTC
This page is a snapshot that refreshes every few minutes, so the countdown is a timestamp rather than a clock. The strip on the BTCUSDT terminal is live and counts down.
The short version
- A perpetual never settles, so nothing forces its price to meet spot. Funding is the substitute: a payment from the crowded side to the other, at 00:00, 08:00 and 16:00 UTC.
- Funding is charged on the notional and paid out of your margin. That is the whole of why leverage multiplies it: the same +0.0100% is 0.10% of the collateral behind a 10x position.
- Three prices are on screen and they are not interchangeable. The last trade fills your orders. The index is the spot composite. The mark decides your PnL, your funding and your liquidation — all of it.
- Funding comes out of free balance first and out of the position’s own margin second. A charge taken from margin moves the liquidation price toward the market, by more than the charge: here 2.01 of price per dollar taken.
- A liquidation is a close at the mark with the ordinary 0.05% taker fee on it, not a penalty. On the worked position it returns 122.08 USDT of the 3,000.00 posted, and your loss stops there.
A dated futures contract is a bet with a deadline. It settles on a fixed day, and as that day approaches its price is dragged toward spot, because at settlement the two must agree. A perpetual future — a perp — deletes the deadline. Nothing ever settles, you never take delivery, and a position can be held for an afternoon or a year. Perps are where almost all crypto leverage lives, and they are the contract behind every price on our perpetuals board.
Deleting the deadline solves one problem and creates another, and the whole design of a perp is the answer to it. This lesson is that answer in the exact form this exchange implements it — including the places where our implementation is simpler than a real venue’s, all of which are named.
What expiry was doing
Settlement is what keeps a dated contract honest. If a September contract trades far above spot in August, anyone can sell the contract, buy the asset, and collect the difference at settlement — so the gap closes on its own, and by the settlement date the two prices are the same number. The deadline is not an inconvenience of the product. It is the anchor.
Take the deadline away and nothing forces the contract and the asset to ever meet again. A perp on BTC could drift a thousand dollars above spot and simply stay there, becoming its own disconnected market with its own price for the same thing. The fix is not a rule and not a cap. It is a recurring payment between the two sides, called funding, which makes the drift expensive to whoever is causing it.
Nothing forces a perp back to spot. Funding just makes staying away cost money, three times a day, to whoever is causing it.
Three prices, and what each one decides
A perp terminal shows three prices that are all “the price”, and confusing them is the most expensive beginner mistake in derivatives. They are different numbers with different jobs, and this exchange uses each one for exactly one purpose.
Swipe horizontally to compare all columns.
| Price | Where it comes from | What it decides here |
|---|---|---|
| Last trade | The venue’s futures tape — the most recent print, one trade at a time. | Your fills. An order walks that live book level by level, and it is what a stop trigger is compared against. |
| Index | A composite of spot prices across venues, published by the venue. | Nothing directly. It is the reference the perp’s premium is measured against — the number that says whether the tether is holding. |
| Mark | The venue’s premium index, anchored to the index price rather than to the last print. | Unrealised PnL, the funding payment, and liquidation. Every decision that can cost you money prices against this. |
The distinction is not academic. A thin moment on a futures book can print a trade far from where the asset is actually valued — one large market order into an empty book, and the tape shows a price nobody else agrees with. If liquidations keyed off that print, a single manipulated trade could clear out positions the real market never threatened. Keying them off an index-anchored mark is what makes that attack pointless.
All three are on screen on the BTCUSDT terminal: the big number is the last trade, and Mark and Index sit in the instrument bar beside the funding rate and a countdown to the next crossing. The Positions tab carries its own Mark and Liq. price columns, which is where the two meet.
Where the rate comes from
The venue computes the rate. We do not, and the lesson would be worse if we did — the number you are charged should be the number the real market set.
A venue’s rate is built from two pieces. The premium term measures how far the perp has been trading from the index over the interval, sampled continuously rather than read once. A small fixed interest term reflects the difference in carrying the two assets. The two are combined, then damped and capped: while the premium is small the rate sits near the interest term rather than twitching around it, and in a violent hour a hard cap stops it running away. The exact damper and cap differ by venue and by contract, which is itself worth knowing — a rate is a venue’s number, not a market constant.
This exchange reads the published rate from the venue’s premium-index endpoint and charges it. That is the same endpoint the terminal’s funding stat displays, the same one the positions sweep pulls a mark from, and the same one the strip at the top of this page read. One number, one source, no second opinion.
One crossing, worked
At each crossing — 00:00, 08:00 and 16:00 UTC — every open position pays or receives. Nothing is charged in between. Funding is three moments a day, not a meter running, and a position closed at 15:59 owes nothing for the 16:00 crossing.
The amount is rate × position size × mark price. A percentage of the whole position, not of the margin behind it — and that one clause is where leverage does its work. Take a long of 0.5 BTC opened at 60,000.0 on 10x, and a published rate of +0.0100%.
- Position size × entry price30,000.00 USDTThe notional. This is what funding, and the taker fee, are charged on.
- Notional ÷ 10x leverage3,000.00 USDTInitial margin, rounded up. This is what you actually post, and all you can lose.
- Taker fee at 0.05% of notional15.00 USDTCharged on the way in and again on the way out.
- Cost to open (margin + fee)3,015.00 USDTThe ticket shows exactly this figure, on the Cost (margin + fee) row, before you click.
- Funding at +0.0100% × size × mark3.00 USDTOne crossing. The mark is held at the entry price here so the multiplication is checkable by hand; a real crossing uses whatever the premium index says at that second.
How long before funding outweighs the fees?
Opening and closing this position costs 30.00 USDT in taker fees — 0.05% each way. At 3.00 a crossing, funding passes that after 10 crossings, about 3.3 days. Under that, the fee is your dominant charge and funding is noise; over it, the position is being rented and the meter is the thing to watch. Which regime you are in is a question about your holding period, and it has a numeric answer.
Where the money actually comes from
This is the part most explanations skip, and it is the part that ends accounts. A funding charge is not billed to some separate account. It is taken from your futures wallet’s free balance first, and only the remainder comes out of the position’s own margin.
An empty free balance is exactly what sizing a position at 100% of the wallet leaves behind. From then on, every charge is a bite out of collateral — and the liquidation price is derived from the collateral, so it moves:
- Liquidation price when the position opened54,271.49.55% below the entry.
- Margin after one 3.00 charge2,997.00 USDTTaken from the position, because there was nothing free to take it from.
And if a single charge would take the margin to zero, the engine does not shave the position down to nothing. It liquidates it, in the same database transaction, through the same code path the liquidation sweep uses. A position with no collateral is not a smaller position; it is a position that has ended, and leaving one on the books with nothing behind it would be a phantom that every later calculation has to work around.
The price the engine acts at
Leverage here is an integer between 1 and 75, chosen on the ticket and fixed when the position opens. While a position or a resting entry exists on that contract the slider locks and says which of the two locked it — the engine rejects a mismatch rather than silently re-levering you.
Margin is isolated. The collateral posted for a position is all that position can lose, and a disaster on one contract cannot reach into another or into your spot wallet.
A position is liquidated when its equity — posted margin plus unrealised PnL, priced at the mark — falls to or below its maintenance margin, which this engine sets at a flat 0.5% of the position’s value at the mark. Real venues widen that rate in brackets as a position grows; this one has no tiers yet, and the flat rate is the number behind every liquidation figure on this site.
Rearranged, that gives the liquidation price directly from the position’s own facts. It is derived on every read, never stored — a stored copy could disagree with the row it summarises after a single funding charge.
- Long — (size × entry − margin) ÷ (size × (1 − maintenance rate))54,271.49.55% below the entry, for the 10x long above.
- Short — (size × entry + margin) ÷ (size × (1 + maintenance rate))65,671.69.45% above the entry. The same size and leverage, mirrored — and slightly closer than the long's 9.55%, because the maintenance requirement grows as the price moves against a short and shrinks as it moves against a long.
The order ticket runs that arithmetic live. Est. liq. sits directly above Open long and Open short, one figure per side, before either button is pressed — and if you already hold a position on that contract, the preview is of the merged book: re-weighted entry, summed margin, the level you would actually have afterwards.
What a liquidation settles
A liquidation is not a mystery event. Our worker scans open positions every five seconds against the venue’s premium-index mark. When a position is at or under maintenance it closes the whole thing at that mark, charges the 0.05% taker fee on it, and returns whatever is left.
Here is the 10x long, at the first tick where equity fell under maintenance:
- Mark price at the moment it goes54,271.3The premium-index mark, one tick under the exact level, never the last trade.
- Equity there (margin + unrealised PnL)135.65 USDTAgainst a maintenance requirement of 135.68. Under it, so the sweep acts.
- Unrealised loss realised−2,864.35 USDT
- Liquidation fee13.56783 USDT0.05% of the position’s value at the mark — the ordinary taker rate, not a penalty rate.
Two things happen immediately afterwards. Every open order you had on that contract is cancelled — protective legs included, since there is nothing left for them to protect — and the whole settlement is written into the ledger as a Position liquidated row, readable on the terminal’s Transaction history tab with the margin settled and the amount returned spelled out.
What this engine does differently
Every mechanic above runs here for real. Five differences are worth knowing before you read anything on the screen as a claim about a live venue.
- Your counterparty is this system, not a crowd. On a real venue funding moves between longs and shorts, and the exchange nets the two. Here there is no crowd of traders to net against, so the payment settles against an internal ledger account. The amount is the venue’s; the counterparty is ours.
- Only the most recent crossing is charged. If our worker is down across a settlement, that crossing is forgiven rather than back-charged: the venue’s historical rates are not retained here, and inventing one to bill you with would be worse than skipping it.
- Liquidation is checked every five seconds, not on every tick. The sweep runs on an interval; a real venue’s risk engine is continuous. In a violent second, this one is slightly slower to act, and the mark it acts on is the one it read on that pass.
- A stale mark settles nothing. If the venue’s premium index for a contract is more than sixty seconds old, the sweep skips that symbol entirely and reports it as degraded rather than liquidating anyone against a price the market has already left. Neither funding nor liquidation runs on a guess.
- There is no maker rebate, no insurance fund and no ADL. Every fill pays the same 0.05% taker rate, because every fill here is taken from the venue’s book and there is no maker side to reward. When a loss exceeds the posted margin, an internal account absorbs the shortfall — your loss still stops at the margin, and no other user is ever deleveraged to pay for it.
Five expensive misreadings
Mistaken belief: “Funding is high, so the price is about to fall.”
What actually happens: A high positive rate says longs are crowded and paying for it. It is a sentiment gauge with a price attached, not a forecast — plenty of rallies have run for days with longs paying the whole way, which is precisely why the payment had to be large.
Mistaken belief: “0.01% is nothing.”
What actually happens: It is per eight-hour crossing, on notional. Three crossings a day is 10.95% a year on the position — and on a 10x position, measured against the margin you actually posted, roughly 109.5%. Compare it to the collateral, not to the contract.
Mistaken belief: “The tape touched my liquidation price, so I am liquidated.”
What actually happens: Not by that print. Liquidation is decided against the premium-index mark, which is anchored to spot and does not follow one trade into an empty book. The reverse also holds and matters more: the mark can reach your level while the tape looks calm.
Mistaken belief: “I put everything in the position, so nothing is wasted.”
What actually happens: Funding comes out of the free balance first. With nothing free, every charge is taken from margin and the liquidation price walks toward the market by 2.01 per dollar taken. A wallet with slack in it is not idle capital; it is the thing keeping your level where you put it.
Mistaken belief: “My liquidation price is my worst case, so that is my risk.”
What actually happens: It is the price at which you lose the whole position plus a fee, chosen by the engine at the worst available moment. An exit you wrote down is a plan; the liquidation price is what happens when there was not one. They are not two versions of the same number.