Beta · non-custodial · trade money you can afford to lose
Abstract digital security illustration: emerald shield with padlock and circuit-line patterns over a dark fintech background, suggesting non-custodial agent-wallet protection

Security · 2026

Is it safe to use a Hyperliquid trading bot?

Yes — if the bot uses Hyperliquid's agent-wallet model. Agent wallets are enforced at the protocol level: a bot can trade, but it cannot withdraw your funds. This page explains exactly how that works, what HyperPerps AI adds on top of it, and which risks remain even with the best custody model.

TL;DR

Your USDC stays in your Hyperliquid account. The bot holds a restricted agent key. That key can place and cancel orders — nothing else. Withdrawal is blocked at the protocol level, not by a promise. On top of that, HyperPerps AI encrypts your agent key with AES-256-GCM inside a private server environment and runs hard server-side gates that reject any trade the model gets wrong before it reaches the exchange.

The agent-wallet model: what it actually does

Hyperliquid has a built-in feature called agent wallets. It's a separate keypair you authorize to act on your account. The critical detail is that the authorization is scoped at the protocol level: agent wallets can only place, modify, and cancel orders. They cannot initiate withdrawals, transfer USDC, or authorize new agents.

When the bot places a trade, it signs the order with the agent key. Hyperliquid verifies the signature, confirms the agent is authorized by your main wallet, and executes the trade. Your USDC never moves to a bot-controlled address. Hyperliquid moves your position balance as the trade fills and closes — but the underlying funds remain in your account the whole time.

The withdrawal block is enforced by Hyperliquid's protocol logic. It is not a smart contract that could be exploited. It is not the bot operator's promise. The protocol simply rejects any non-trade transaction signed by an agent key. A hacked or malicious operator still cannot withdraw your funds.

What a Hyperliquid trading bot can and cannot do

An agent wallet CAN

  • Place perpetual futures orders (long, short, market, limit)
  • Set stop-loss and take-profit orders
  • Modify or cancel orders it placed
  • Adjust leverage on positions it opens
  • Read your account state (balance, positions, fills)
  • Route orders via builder codes

An agent wallet CANNOT

  • Withdraw USDC to any external address
  • Transfer USDC to another Hyperliquid account
  • Move funds between Spot and Perps wallets
  • Cancel your manual orders (only its own)
  • Read your seed phrase, password, or passkey
  • Authorize new agent wallets on your behalf

The CANNOT column is the security guarantee. It is enforced by the protocol — not by a terms-of-service clause, not by an audit, not by the operator's reputation.

How HyperPerps AI secures your agent key

The agent-wallet model protects you from fund theft. HyperPerps AI adds a second layer: protecting the agent key itself from being misused.

  • No API keys, no passwords. Authentication is done with EIP-191 wallet signatures — your main wallet signs a message to prove ownership. Nothing to phish, nothing to leak.
  • Agent key encrypted at rest. Your agent key is encrypted with AES-256-GCM and stored inside a dedicated Cloudflare Durable Object — one per wallet, isolated from every other user's environment. The key never leaves that environment in plaintext.
  • All LLM calls happen server-side. The AI that evaluates trades runs inside the Durable Object. The system prompt and trade logic are never sent to your browser. There is no public LLM endpoint to hit.
  • Mainnet only. There is no testnet toggle. The bot runs on live Hyperliquid with real funds. That keeps the security model simple and consistent.

You can read more about the setup process in the Hyperliquid trading bot setup guide.

Hard risk floors the model cannot bypass

Even with a well-designed custody model, an AI that makes reckless trades is still dangerous. HyperPerps AI has server-side gates that run on every decision before it reaches Hyperliquid. The model cannot bypass these — they execute on the server after the model responds.

  • Stop-loss orientation check. For a long, the stop must be below entry. For a short, above. A mis-oriented stop is rejected outright — it would trigger instantly on placement.
  • Risk-reward floor. Trades below the configured R:R minimum are rejected. The model cannot force a bad setup through by optimistic framing.
  • Expected-value gate. A secondary check that accounts for position sizing relative to risk. Marginal setups that clear R:R on paper but fail EV are also rejected.
  • Atomic bracket placement. The entry order and its stop-loss are placed in a single signed payload using Hyperliquid's normalTpsl grouping. Either both land, or neither does. A filled position is never on the book without its stop — there is no gap window.
  • Naked-position invariant. If the stop-loss leg fails after the entry fills (rare), the bot retries a standalone stop. If that also fails, it issues an emergency market close. The invariant is: an open position always has a stop.
  • Position size within budget. Size is calculated from your risk-per-trade setting divided by the stop distance. It is clamped to your configured leverage maximum. The model does not control size directly.

What this means in practice: a model that hallucinates a stop-loss on the wrong side of entry gets rejected before the order is signed. A model that returns an R:R below the floor gets rejected. These are not logged as warnings — the trade simply does not go through.

How to revoke access in 30 seconds

You decide which agent wallets are authorized on your account. Revoking is instant:

  1. Open app.hyperliquid.xyz and connect your main wallet.
  2. Go to Subaccounts → Approved Builders / Agents.
  3. Find the agent wallet authorized for the bot and click Revoke.
  4. Sign the revocation with your main wallet. It takes effect immediately.

From that moment, the bot cannot place new trades. Existing positions remain on Hyperliquid — they're yours. Any stop-loss or take-profit orders already on the book continue to execute normally.

Tip: revoking does NOT close open positions. If you're revoking because something feels wrong, flatten your positions manually first. Otherwise the stop-loss orders on the book will handle the close — which is usually what you want, but worth knowing.

Risks the agent wallet does not solve

The agent-wallet model protects you from one specific risk: a malicious or compromised operator stealing your funds. It does not protect you from these:

1. The bot makes losing trades

An AI that reads a setup wrong will lose money — within its permitted scope. This is the same risk as any discretionary trader. The agent wallet does not distinguish good trades from bad. Your defenses are the bot's stop-loss discipline, your position sizing configuration, and not deploying capital you cannot afford to lose.

2. Slippage during volatile events

During flash crashes, exchange outages, or extreme funding-rate spikes, stop-losses can fill at worse prices than expected. This happens to manual traders too. Use lower leverage, keep position sizes small relative to account value, and consider pausing the bot during scheduled high-impact events (CPI, FOMC, large protocol unlocks).

3. Hyperliquid venue risk

Hyperliquid is a young chain. If the L1 halts or has a critical bug, your positions and the bot are both frozen. Hyperliquid's track record has been strong, but it is not zero-risk infrastructure. This is the unavoidable cost of using an on-chain venue over a centralized exchange.

4. Main wallet compromise

If someone gets your main wallet's seed phrase or passkey, they have full authority — withdraw, revoke agents, everything. The bot does not extend this risk. It's the standard "protect your seed phrase" rule that applies to every crypto holder. For large account sizes, a hardware wallet authorizing the agent is the highest-security option.

5. AI model misjudgment

No AI evaluator is correct all the time. The risk is a string of losses in a regime the model reads poorly. The mitigation is the hard server-side gates described above — they catch structurally bad outputs — but they cannot catch a technically valid setup that the market proves wrong. Track your bot's performance via the auditable reasoning log in the app and adjust your strategy configuration accordingly.

You can also monitor the broader market context — whale positioning, liquidation clusters, stop pools — on the free Whale Liquidation Heatmap to understand what the bot is seeing.

Custodial vs non-custodial: the real difference

Most bot risk discussions blur this line. It matters enormously:

Custodial botNon-custodial bot (agent wallet)
Where USDC sitsIn the bot operator's walletIn your Hyperliquid account
If operator goes rogueThey can drain your fundsThey cannot withdraw — only trade
If operator gets hackedHackers can drain your fundsHackers can place trades; cannot withdraw
If operator goes bustFunds may be stuck in proceedingsFunds are in your HL account; not affected
How to leaveWithdraw (operator must cooperate)Revoke agent in 1 click; funds were always yours

A bot that asks you to deposit USDC into "their" wallet first — under any framing — is custodial. You are trusting the operator to be honest, solvent, and unhacked. The Hyperliquid agent-wallet model removes that trust requirement. The distinction is trusting a person versus trusting a protocol.

Try a non-custodial Hyperliquid bot

HyperPerps AI uses the agent-wallet model. Your USDC stays in your Hyperliquid account. We cannot touch it. Free to use — 0.02% builder fee per trade, no subscription.

Launch HyperPerps AI →

Zero monthly cost · 0.02% builder fee per trade

Frequently asked questions

Has any Hyperliquid trading bot ever drained user funds?
Bots that use the proper agent-wallet model cannot drain funds by construction. The protocol rejects all withdrawal transactions signed by an agent key. Custodial bots — where you deposit USDC into the operator's wallet — carry real counterparty risk and have caused losses across the broader crypto-bot space. That is exactly why the agent-wallet model exists.
What if the bot operator's server gets compromised?
With the agent-wallet model, the worst case is that an attacker can place trades on your account. They cannot withdraw your funds. The trades still go through Hyperliquid's normal execution and are subject to the risk floors configured in the bot. You'd see unauthorized activity in your event log and can revoke the agent in under a minute.
Can I run a Hyperliquid trading bot with a hardware wallet?
Yes. Your main wallet can be a hardware wallet (Ledger, Trezor). The hardware wallet authorizes the agent wallet once during setup. After that, the bot uses only the agent key for all trades. Your USDC stays in your Hyperliquid account; the agent's restricted permissions still apply.
If the bot stops responding, are my positions stuck?
No. Positions and stop-loss orders already on Hyperliquid's order book execute regardless of whether the bot is running. If the bot goes offline, your position closes at its stop-loss or take-profit — whichever fills first. The bot can't open new trades, but your protection is already on the book.
What about smart contract risk on Hyperliquid?
Hyperliquid's bridge contract (where USDC enters and exits) is the only smart contract in the trade flow. It has been audited and has operated at multi-billion-dollar scale without incident. Beyond the bridge, Hyperliquid's L1 handles order matching at the protocol level — not via user-deployable contracts — so smart contract risk is comparatively low versus bots on Solidity-based DEXes.
Can I trust the AI not to make reckless trades?
The AI's output is validated server-side before any order reaches Hyperliquid. Hard gates check stop-loss orientation (the SL must be on the correct side of entry), a risk-reward floor, and an expected-value gate. Position size is capped to your configured budget. The entry and its stop-loss are placed as one atomic bracket — a filled position is never on the book without its stop. These gates run regardless of what the model outputs; a bad model response is rejected before it touches the exchange.
More on this topic
← Back to the Hyperliquid AI trading bot guide

The pillar guide covers what AI trading bots are, the different types, and what to look for before deploying capital. Read the guide →

Related: How to set up the bot · What "free" actually means · Best Hyperliquid trading bot 2026