How it actually works
Asymmetric impact PnL
How the Exchange settles a close, and where the protocol takes its cut of a trade.
Positions open at the Hyperliquid mid, and a close uses the mid of the block in which it executes. There is no spread, no slippage, no funding, no fee on position size and no gas charged to you. A loss is never charged more than the loss: while the queue is empty its fee is carved out of what the LP receives, and while claims are queued it is waived.
On a winning close the protocol applies an asymmetric impact haircut to the gain. It is not a fee on your notional and not a spread on the price: it multiplies the gain by a factor that depends on how far the price moved between entry and exit. On a very small gain it takes most of it; as the move grows, it takes less. A winning close goes through four steps, in order:
- Deadband. The gain is measured as if the exit were 0.002% of the entry price (entry divided by 50,000) less favourable. A smaller win becomes zero.
- Holdback. If the price moved by an amount inside the band of the payout curve in force, the move is shortened a little further before anything else is computed.
- Impact. The remaining gain is scaled by the formula below.
- Win fee. 2% of the scaled gain is the fee; you receive the rest. A close signed with a session key that names an approved builder also pays that builder 0.5% of the scaled gain (see Builder codes); the app’s own keys name none.
Two payout curves
Two payout curves are fixed in the contract. They differ only in the band of moves they hold back:
| Curve | Band of price moves held back | Largest holdback |
|---|---|---|
| Standard | 0.0075%–0.06% | 0.0118% at 0.0338% |
| Off-hours | 0.003%–0.1% | 0.0204% at 0.0418% |
The off-hours curve applies in quiet periods such as weekends and nights, when the order book is thinner. A dedicated keeper switches between the two on a published schedule; it can choose one of these two curves and nothing else, and every close in one transaction settles on the same curve. Outside the band, and at its edges, nothing is held back. Inside it, a bigger move still always pays more.
Properties
- Asymmetric. Only winning closes are scaled. Losing closes pay nothing extra.
- Sized by the move, not the position. The share kept does not depend on whether you close a small or a large position. A reference notional per market sets the steepness; the size of your trade does not enter it.
- Bigger moves keep more. The haircut shrinks smoothly as the move grows, up to a ceiling: a win never keeps more than 90% of its gain before the fee. Inside the holdback band the share kept is lower than the smooth curve, but the payout still rises with every tick of the move.
The formula
All values are integers and every division rounds down. Prices are raw (the Hyperliquid price times the market’s price scale); wad values carry 18 decimals, so 1e18 is one.
db = entry / D deadband in raw units, D = deadbandDivisor
d = |exit − entry| − db zero or less: no gain
pnl = N · d / entry N = margin × leverage
move = d · 1e18 / entry the move beyond the deadband, as a wad
lo, hi = entry · a / 1e6, entry · z / 1e6 the curve's band in raw units; in band when lo < |exit − entry| < hi
move = (d · 1e18 − h) / entry in band, h the holdback (below); zero or less: no gain
gain = N · move / 1e18 in band, else pnl
term1 = 1e36 / (move · rm / 1e18) rm = rateMultiplier
term2 = rn · 1e18 / (1e6 · move · pm / 1e18) rn = referenceNotional, pm = positionMultiplier
scale = (1e18 − b) · 1e18 / (1e18 + term1 + term2) b = baseRate
adjusted = gain · scale / 1e18
The holdback of a curve with band (a, z) (in millionths of the entry price) and scale k, for a favourable price move p = |exit − entry| inside the band, in raw units, with u the position of p in the band:
w = hi − lo, u = (p − lo) · 1e18 / w, v = 1e18 − u, t = u · v / 1e18
standard: h = k · w · (t · t / 1e18) / 1e18 k = 3.597 · 1e18
off-hours: h = k · w · ((t · t / 1e18) · v / 1e18) / 1e18 k = 6.085 · 1e18
Every step rounds down. h is in raw units scaled by 1e18; the one division by entry above turns the held-back move into a wad. pnl itself is never held back: it is what the close event reports as the gain.
As the move grows, both terms shrink, the denominator approaches one and the share kept approaches 1 − b. As the move approaches zero, the terms grow without bound and the scaled gain collapses toward zero; if either term’s denominator rounds to zero, the scale is zero. A loss is simply min(N · |exit − entry| / entry, margin), with no deadband and no scale.
Deployed parameters
| Parameter | BTC | ETH |
|---|---|---|
| Deadband | 0.002% | 0.002% |
Base rate b |
10% | 10% |
Rate multiplier rm |
15,000 | 15,000 |
Position multiplier pm |
814.598 | 483.979 |
Reference notional rn |
$100,000 | $100,000 |
What that means for a winner, counting the deadband:
| Price move | Gain kept · BTC | Gain kept · ETH |
|---|---|---|
| 2 bp | 20.3% | 16% |
| 5 bp | 54.6% | 48.1% |
| 10 bp | 73.9% | 69% |
| 25 bp | 82.9% | 80.4% |
| 50 bp | 86.4% | 85% |
| 100 bp | 88.1% | 87.4% |
| 200 bp | 89.1% | 88.7% |
| 500 bp | 89.6% | 89.5% |
Why the size term is fixed
In a size-dependent version of this curve, the second term grows with the position’s actual notional, so larger trades lose a larger share of their gain. At this leverage that would push traders into many small positions (more transactions, more state, more gas) without improving anyone’s economics. Here the second term uses a fixed reference notional per market instead, so the haircut is the same percentage for every position size.
Why this design
At this leverage, neither a fee on notional nor a spread on the price could sustain an LP: either it would be too small to matter or too large for anyone to pay. The impact scale puts the cost where it scales with the outcome: the gain of a winning trade. Losses never pay extra.
The curve also puts friction on small gains, including gains that might come from briefly distorting the book. It is not a price check, though, and does not make manipulation unprofitable; see Risk.
From PnL to payment
The adjusted result goes into the settlement rules of Solvency & queue: a win is paid as adjusted minus the win fee (and the builder fee, when there is a builder), or queued when the LP is short; a loss goes into the LP minus the loss fee, or into the side bucket while claims are queued. The app and the services use a TypeScript port of these formulas that is checked, wei for wei, against test vectors generated by the contracts and against values observed on-chain.