DOCS / GUARDIAN
Guardian: autonomy without custody
A stop-loss that fires at 3am needs someone awake. Guardian is that someone — with a key that can do exactly one thing: reduce the position you told it to protect. One signature delegates it; everything it does lands as a receipt.
Arm it in a sentence
In chat (or the embed), with a Hyperliquid position open:
protect my eth long with a 5% stop take profit on my eth long at $2100
No delegation yet? You’ll get the one-time approveAgent signature first — Hyperliquid’s own delegation primitive, signed by your wallet, expiring on its own schedule. Policies can also arm as the final auto step of a job: “…then protect it with a 5% stop” arms the policy the moment the long fills.
What the delegated key cannot do
The delegation is an agent key on Hyperliquid’s L1 — not your private key. It:
- cannot withdraw — funds never move off the exchange under it,
- cannot open or grow positions — every guardian order is reduce-only, sized to the live position,
- cannot touch other assets — the policy pins one coin, one side,
- expires — and you can revoke it or hit the kill switch any time.
Fail-closed at fire time
A cron sweep watches armed policies every minute. When a trigger crosses, the close is rebuilt from scratch and re-guarded before submission — the guard refuses if anything drifted:
- the order isn’t reduce-only, is oversized, or targets the wrong asset or side,
- the delegation lapsed or was revoked, or the kill switch is on,
- the trigger is no longer true at build time (a wick, not a move),
- a price bound would fill worse than the policy allows.
Any failed check means no order. The sweep logs the refusal and tries again next tick if the trigger still holds. Guardian never improvises.
Receipts, like everything else
Every armed policy, every trigger evaluation that fires, every close: a receipt on /dashboard/guardian with the position, the trigger, the fill, and the guarded value. Autonomy you can audit beats autonomy you have to trust.
The shape of the thing
| Piece | What it is |
|---|---|
| Delegation | Hyperliquid approveAgent — your wallet’s one-time EIP-712 signature naming a server-held agent key, with an expiry. |
| Policy | One coin, one side, one trigger (percent stop or absolute take-profit), armed from chat or as a job’s auto step. |
| Sweep | Per-minute cron: evaluate triggers → rebuild → re-guard → submit or refuse. |
| Guard | The same fail-closed pattern as every native venue: the artifact is re-derived and checked against the policy at the last moment, never replayed from storage. |