Skip to content
  • Simulator
  • App
  • Transparency
  • Docs
XOpen app
  • How it works
  • Fees
  • Supported positions
  • Security model
  • Risks
  • Contracts
  • FAQ

MIRAGE has had no external audit. An enclave holds the link between a reserve and the account it protects, and you trust it. A reserve moves your real level. The level still exists. Read the risks.

Product

  • Simulator
  • App
  • Transparency

Docs

  • How it works
  • Fees
  • Security model
  • Risks

Project

  • Contracts
  • Brand kit
  • Terms and risk disclosure

Not available where prohibited. Nothing here is investment advice. Trading perpetuals with leverage can lose your entire margin.

How it works

The public level, the reserve, a defence, and how you get your funds back.

The public level

Hyperliquid computes a liquidation price for every position from the margin in the account, and shows it to anyone who looks up the address. We call that the public level.

The formula is published in Hyperliquid’s docs:

liq_price = price − side × margin_available ÷ position_size ÷ (1 − l × side)
l = 1 ÷ maintenance leverage        side = 1 for long, −1 for short

Less margin in the account means a level closer to price. More margin means a level further away.

The reserve

A reserve is USDC you hold with MIRAGE instead of in your Hyperliquid account. Most of it sits in the vault contract on Elysium. Between 20% and 30% of all reserves sit in a buffer account on Hyperliquid, ready to be sent.

The public level ignores the reserve, because the reserve is not in your account. The real level is where the position would be liquidated once the reserve is counted. It is further from price than the public level.

A reserve moves your real level. The level still exists.

Depositing

  1. Connect a wallet that has no on-chain link to the account you trade on.
  2. Choose a size: 100, 500, 1,000, 5,000, 25,000 USDC. Sizes are fixed so the amount does not identify you.
  3. Your browser derives a reserve secret from a signature by that wallet. The vault records a commitment to the secret, never the secret.
  4. Approve the USDC and deposit.

Signing the same message with the same wallet recreates the secret on any device, so the wallet is the backup.

Public on Elysium: the depositing address, the size, the time and the commitment.

Not public: which Hyperliquid account the reserve protects.

The protection order

A protection order links a reserve to an account. It holds:

  • the Hyperliquid account to protect
  • a trigger distance: how close mark price may come to the public level before we act
  • a target distance: how far from price the level sits after a top-up
  • a cap on any single top-up

Your browser encrypts the order to the engine’s public key and signs it with the reserve secret. Inside an enclave, only the engine can read it. On an interim host, we can read it too. Either way, only the holder of the reserve secret can create or change it.

The trading account signs nothing. MIRAGE never holds a position.

A defence

  1. The engine watches each protected account through Hyperliquid’s API: positions, margin, mark price and liquidation price.
  2. When mark price comes within the trigger distance of a public level, the engine works out the USDC needed to restore the target distance. The cap and the remaining reserve limit that amount.
  3. The engine sends the USDC from the buffer to the protected account with a Hyperliquid USDC transfer.
  4. It reads the account again to confirm the level moved, and repeats if price is still inside the trigger distance.

Each top-up is one defence. The fee is 1% of the amount sent.

Before a defence fires, nothing on Hyperliquid connects your account to a reserve. After it fires, the transfer from the buffer to your account is public.

Withdrawing

You can withdraw any amount of unspent reserve to any address on Elysium.

  1. You sign the request with the reserve secret.
  2. The enclave checks your balance and signs a withdrawal voucher.
  3. A relayer submits the voucher to the vault, so the receiving address needs no gas.
  4. The vault checks the signature, marks the voucher’s nullifier as used, takes the 0.25% fee and pays the address.

The buffer and the bridge

A rebalancer keeps the buffer between 20% and 30% of total reserves. It moves USDC between the vault on Elysium and the buffer on Hyperliquid through Relay.

The vault lets the operator key move funds along that one allowlisted route only, and only up to a cap per epoch.

Heartbeat and escape hatch

Every 60 minutes the enclave posts a heartbeat to the vault: a state root and the total it owes. The state root is a Merkle sum tree of reserve balances.

If no heartbeat arrives for 7 days, the escape hatch opens. You then withdraw from the vault directly with a Merkle proof against the last root, signed by the reserve secret, without the enclave and without us.

The hatch pays pro rata to what the vault holds. Funds that were in the Hyperliquid buffer may not be recoverable, because the enclave holds that key. Read the risks.

NextFees