Hyperliquid’s liquidation documentation, checked on December 3, 2026, says a position is liquidated when account equity falls below the maintenance margin, and that in cross margin the liquidation price does not depend on the leverage you set. That one detail changes how you should size a Hyperliquid strategy in Gimmer: the number that decides how far price can move against you is the total notional you hold compared with your account value, not the leverage field on its own. This tutorial shows how to size margin so that a single liquidation cannot wipe the account, and how to read the Margin required estimate before any order goes out.
This is a tutorial, not a trading signal or a recommendation to use leverage. Hyperliquid is an independent venue with its own rules, and Gimmer does not operate it, hold funds on it, or control its liquidation engine. The parameters quoted below come from Hyperliquid’s own documentation, which describes them as current settings that can change; always check the venue before you rely on them.
What Hyperliquid’s documentation says
The Hyperliquid liquidations page sets out the mechanics in a few rules that matter for sizing:
- The trigger: a liquidation happens when account equity, including unrealized PnL, drops below the maintenance margin. Liquidations use the mark price, which Hyperliquid builds from external exchange prices and its own order book.
- The maintenance margin: it is half of the initial margin at the asset’s maximum leverage. The page gives a range from 1.25% for assets with 40x maximum leverage to 16.7% for assets with 3x maximum leverage.
- Cross margin shares the cushion: for cross positions, the margin available before liquidation is the whole account value minus the maintenance margin required, so every open cross position draws on the same buffer.
- Leverage does not move the cross liquidation price: the docs state that for cross margin the actual liquidation price is independent of the leverage set. What moves it is position size relative to account value.
- Book first, then backstop: Hyperliquid first tries to close the position with market orders on the book; if that restores the maintenance requirement, the remaining collateral stays with the trader. Large positions above 100,000 USDC are liquidated 20% at a time, with a 30-second cooldown.
- The backstop is the worst case: if equity falls below two thirds of the maintenance margin without a successful book liquidation, the liquidator vault takes over. In a cross account with no isolated positions, the docs say the trader ends up with zero account equity.
The page also publishes the liquidation price formula used in the example below.
Common sizing mistakes on a cross-margin perpetual
- Treating leverage as the risk dial: lowering the leverage field from 10x to 3x while keeping the same notional does not move a cross liquidation price. Reducing notional does.
- Reading Margin required as the maximum loss: the margin an order locks is a deposit, not a cap. Gains and losses follow the full notional, and losses can reach the full margin.
- Sizing each market alone: a strategy that can hold BTC and ETH at the same time is one cross exposure, not two independent ones. Correlated moves hit both positions while they share one cushion.
- Leaving no reserve: fees, funding payments and slippage all reduce account value. A strategy that uses all available collateral leaves nothing between a normal adverse move and the maintenance line.
- Relying on a stop alone: the Gimmer Margin guide is explicit that liquidation can occur before a configured exit. A gap or a failed order can let price reach the liquidation level first.
The margin sizing checklist
| Step | Question | Evidence to keep |
|---|---|---|
| 1. Account value | How much USDC collateral is actually in the Hyperliquid account the strategy uses? | Account value on Hyperliquid, checked on the venue, with the date. |
| 2. Maintenance rate | What maintenance margin does each market use today? | The market’s maximum leverage on Hyperliquid and the resulting maintenance rate. |
| 3. Worst-case notional | What is the combined notional if every market the strategy trades opens at once? | Sizing times leverage times number of simultaneous positions. |
| 4. Distance to liquidation | How far can price move against the combined position before equity hits the maintenance line? | A worked calculation, plus the liquidation price shown on Hyperliquid once a simulated or small position is open. |
| 5. Exit before liquidation | Does the stop loss sit well inside the liquidation distance, with room for slippage? | Stop distance versus liquidation distance, and backtest trades that hit the stop. |
| 6. Reserve | How much collateral stays unused for fees, funding and bad fills? | The reserve amount and the rule that keeps the strategy from using it. |
Use Hyperliquid in Gimmer: size margin with the Margin required estimate
Gimmer supports Hyperliquid USDC-settled perpetuals with cross margin and leverage from 1x up to 10x. The steps below follow the Margin execution guide, which carries a High risk label and warns that leverage amplifies gains, losses, fees, and liquidation risk, and the Risk controls guide.
1. Connect the account you will measure
Open Exchanges, choose Hyperliquid, and enter the Account address and the API wallet private key. The form’s hint reads “API wallets can trade but cannot withdraw funds.” Create the API wallet on Hyperliquid’s own API page, authorised by your main account, and never enter your main wallet’s private key or seed phrase anywhere. The Connect an exchange guide covers validation. Funding the account and moving collateral happen on Hyperliquid itself, so check the account value there before you size anything.
2. Set sizing and leverage together
Build a strategy from AI Decision, Indicators, Code Editor, Swing or Portfolio and select Margin as execution. Choose percentage or fixed sizing, then set leverage. The Risk controls guide puts the key rule plainly: “In Margin mode, multiply by leverage to understand notional exposure.” At v3.0.455 the builder lists BTC, ETH, SOL and XRP against USDC; if the strategy can hold several of them at once, add their notionals together, because cross margin pools them into one exposure.
3. Read the Margin required estimate on the Trade page
Before automating, open the Trade page and use the order ticket in Simulation. Choose Buy / Long or Sell / Short, enter a size, and set Leverage (cross margin, up to 10x). Keep the size fixed and watch how Margin required changes as you raise the leverage: the locked margin falls, but the notional, and therefore the loss per percentage point, stays the same. That is the moment to remember that a lower margin figure is not lower risk. An order against an open position closes it, and the ticket then shows Closes position.
4. Place the stop inside the liquidation distance
Configure a stop loss and, if you use one, a trailing exit. Compare the stop distance with the liquidation distance from your checklist and leave a wide margin between them. The Margin guide’s heading says it directly: “Liquidation can occur before a configured exit.” The Risk controls guide adds that a control can fail to execute, so keep monitoring until a position is actually closed. Our stop-loss checklist explains why a stop is a request, not a fill.
5. Backtest, then simulate, then decide
Run a backtest and read Max drawdown together with Open PnL, not only closed trades. If the test window reaches back before Hyperliquid’s own candle history, that earlier part is backfilled from another venue’s reference candles and is only an approximation of Hyperliquid prices. Then run the strategy in simulation and watch Runtime activity, positions and orders. Our earlier posts on Hyperliquid support in Gimmer, margin during a short squeeze and reading maximum drawdown cover those steps in more depth.
A short example
The following is a synthetic example with round numbers, a single long position on a market with an assumed 2.5% maintenance margin, and an assumed entry price of 100,000 USDC. It ignores fees, funding and slippage, which all make the real result worse.
- The account holds 1,000 USDC and opens 2,000 USDC of notional (0.02 units). Maintenance margin is 50 USDC, leaving 950 USDC of cushion. Using Hyperliquid’s formula, the liquidation price is about 51,280, a drop of roughly 49%.
- The same account opens 5,000 USDC of notional (0.05 units). Maintenance margin is 125 USDC and the cushion is 875 USDC. The liquidation price is about 82,050, a drop of roughly 18%.
- The same account opens 10,000 USDC of notional (0.1 units). Maintenance margin is 250 USDC and the cushion is 750 USDC. The liquidation price is about 92,310, a drop of under 8%.
- In each case, changing only the leverage field while keeping the notional fixed would change the margin locked, but in cross margin it would not move these liquidation prices.
- If a second correlated position opens at the same time, its notional and maintenance margin come out of the same 1,000 USDC, and every liquidation price moves closer.
The example illustrates the arithmetic only. It is not a recommended position size, leverage level or trade.
What this sizing approach cannot do
- It cannot prevent liquidation. Gaps, fast moves, mark-price differences and failed orders can carry a position past a stop.
- It cannot fix the venue’s parameters. Hyperliquid sets maintenance margins, maximum leverage and liquidation rules, and can change them.
- It does not include funding payments unless you add them yourself; funding applies to perpetual positions and reduces account value over time.
- Gimmer does not offer isolated margin, leverage above 10x, or deposits and withdrawals for Hyperliquid. Cross margin means one account-wide cushion.
- A backtest cannot reproduce Hyperliquid’s real liquidation engine, order book depth or backstop behaviour, and backfilled periods are an approximation.
Perpetuals are high risk: leverage amplifies losses and fees, funding payments apply, and losses can reach the full margin. Trading digital assets involves substantial risk. Backtests and simulations do not guarantee future results. Gimmer is a desktop workspace for designing, backtesting, simulating and operating automated strategies; it does not provide financial advice or trade on your behalf.
Frequently asked questions
If I lower leverage in Gimmer, am I safer from liquidation?
Only if the notional falls too. In cross margin, Hyperliquid’s docs say the liquidation price does not depend on the leverage set. Lower leverage with the same sizing locks more margin but leaves the liquidation distance where it was; smaller notional moves it further away.
Is Margin required the most I can lose?
No. It estimates the margin an order needs. Losses follow the full notional, and in a cross account a backstop liquidation can take the whole account equity, as Hyperliquid’s documentation describes.
Can I use isolated margin to protect the rest of my account?
Not through Gimmer. Hyperliquid strategies in Gimmer use cross margin, so the practical protections are smaller notional, fewer simultaneous positions and an unused reserve.
Size for the cushion, not the ticket
The leverage field and the Margin required estimate are useful, but on a cross-margin perpetual the decision that protects the account is how much notional you hold against how much equity you have. Write that number down before the strategy runs.
Next step: Read the Margin execution guide, work through the checklist above for your own account, and try the Trade page in Simulation before considering a small live amount you can afford to lose.
— The Gimmer Team