Connect Hyperliquid
Session keys, builder fees, and onboarding
Quant uses Hyperliquid's native agent / extra-agent feature to place orders on your behalf without holding your funds. The onboarding modal generates a session key, asks HL to recognise it, and approves the 0.05% builder fee that pays Quant per trade.
How session keys work
A session key (HL calls it an "extra agent") is a fresh wallet generated locally in your browser. You sign a one-time EIP-712 message authorising HL to accept orders signed by that key. The session key:
- Can place / cancel orders on your account, but cannot withdraw funds. The withdraw endpoint requires your master wallet signature.
- Is valid for 180 days from approval. After that the modal pops back up to rotate the key.
- Is encrypted on this device under a signature only your master wallet can produce — opening the page on a different browser starts a fresh onboarding for that device.
The 0.05% builder fee
Hyperliquid has a built-in fee-routing system: third-party interfaces can charge a per-trade builder fee that HL collects on their behalf. We approve the fee up-front so HL handles it automatically — you never see a separate invoice or charge.
Deposit minimum
Hyperliquid won't credit a deposit below 5 USDC. The onboarding modal offers an integrated bridge from your Arbitrum USDC balance — it signs a single ERC-20 transfer to the official HL bridge and polls until HL credits the deposit on your account.
Already have USDC on HL? The modal skips the deposit step and goes straight to the session-key approval.
The full flow, step by step
- Switch network. Privy switches your wallet to Arbitrum (HL signs the EIP-712 with the Arbitrum domain).
- Sign HL terms. One-time per wallet; required by HL before any other endpoint will accept you.
- Bridge USDC (if HL balance < 5). We poll HL until the credit lands.
- Approve agent.First EIP-712 prompt: authorise Quant's session key for 180 days.
- Approve builder fee. Second EIP-712 prompt: allow HL to deduct 0.05% per trade and pay it to Quant.
- Encrypt session key. One quick
personal_signmessage — the resulting signature encrypts the local session key. The signature never leaves your device.
Resetting / rotating
If a signature stalls
On mobile a wallet sometimes accepts the signature but never returns focus to the browser. After ~25 seconds we surface a "Still waiting on your wallet?" CTA so you can retry from the start. The previous request still goes through on the wallet side — if a duplicate-pending error appears, dismiss the old prompt in your wallet first, then retry.
If the wallet doesn't hydrate at all
On a brand-new device Privy can briefly know your wallet address before the local connector lists it. We wait 5 seconds before showing the "Privy didn't return a connected wallet on this device" message. If it persists, tap Sign out & reconnect to clear the Privy cookie and re-link.
Rotating the session key
Approving a new session key from another browser will overwrite the previous one on HL's side. Quant detects this on the next page load (we cross-check HL's extraAgents list) and prompts you to reconnect. No funds are at risk — only the ability for that one stale browser to sign orders.
