Leverage

Leverage is the ratio between the size of a position and the margin standing behind it.

Definition

It multiplies the same market move against a smaller amount of your own money, in both directions. On Hyperliquid it is an integer between 1 and the market's maximum, chosen when the position is opened, and the margin required to open is position_size * mark_price / leverage. Picking a leverage is really picking that figure. The maximum varies by asset from 3x to 40x, and the maintenance margin follows it: half the initial margin at the maximum, so 1.25% of the notional on a 40x market and 16.7% on a 3x one.

Leverage is only checked when a position is opened. The documentation says the leverage of an existing position can be increased without closing it, and that the trader is then responsible for monitoring the leverage usage to avoid liquidation. On a position with negative unrealized profit and loss the possible actions it names are closing it partly or fully, adding margin if the position is isolated, and depositing USDC if it is cross.

How it moves the liquidation price depends on the mode, and this surprises people. For an isolated position the liquidation price does depend on the leverage set, because the amount of isolated margin allocated depends on the initial margin set: a lower leverage sets more aside and the liquidation price sits further away. For a cross position the documentation says the actual liquidation price is independent of the leverage set, and that a cross position at lower leverage simply uses more collateral: there, what moves the liquidation price is the collateral standing in the account.

Three things it does not change. It does not change the funding paid, which is computed on the position size times the spot oracle price. It does not change the fees, which are a share of the notional on each side of the trade. And it does not change the price at which the idea turns out to be right: only whether the position is still open when that price arrives. Our charter uses 3 on every step of the ladder, with bounds from 1 to 5, and the base stake is not typed but computed from the leverage, the room left before liquidation and the sum of the ladder, which with the defaults gives 2.78% of the equity.

Formula

initial_margin = position_size * mark_price / leverage, so the leverage of a position is position_value / margin. The maintenance margin is half the initial margin at the market's maximum leverage.

Example

An example, in round figures. A margin of $1,000 at 10x holds $10,000 of notional, which is 0.1 BTC at $100,000. A move of 1% in the price is $100, which is 10% of the margin. The same $1,000 at 3x holds $3,000, and that 1% move is $30, so 3% of the margin. The notional behaves identically either way: the market does not know how much of your own money stands behind it.