Skip to content
Leverage can liquidate a position. Paper results are not a forecast. These pages describe what the app does today.
Docs02
Browse the docs

Architecture

The desk is a web app with a server that owns every decision that matters. The browser shows state and sends intents. The server checks them, fills them and remembers them.

On this page

System diagram#

A message or a ticket reaches the gateway. The agent turns words into an order card, the risk engine decides whether the card may exist, you confirm it, and the paper engine fills it. Live orders take the venue adapter instead, and only when the server allows it.

Desk appchat · terminal · positionsGatewaysession · same-origin · rate limitAgentmodel reply → order cardMarket feedHyperliquid public dataRisk engine14 checks · caps · stopsConfirm45 s · re-check the markPaper engineorders · margin · triggersVenue adapterlive path, server-gatedAccount bookpositions · fees · fundingmessagemarksorder cardpassesconfirmedlive only
One path for every order. The model proposes, the risk engine decides, you confirm, and then the paper engine fills or the gated venue adapter sends.

Design principles#

  • The server decides. Prices, limits and fills are computed on the server. The browser cannot widen a cap or supply a price.
  • The model proposes, it never prices. Fields the model invents, including any price, are dropped before a card is built.
  • One path. Agent cards, the ticket and the one-click buttons share the same checks and the same fill code.
  • Fail closed. No usable price means no order. A stale quote refuses new orders and fires no stop or liquidation.
  • Closing is always allowed. The emergency stop, the trading halt and the daily loss stop block new risk. They never block a close.

Components#

ComponentWhat it does
GatewayNext.js route handlers. Every write needs a signed-in session and a same-origin request. Order and stream routes are rate limited.
AgentsA bot per teammate. Each turn sends a minimized market snapshot to the chosen model and parses a fixed JSON reply into at most one order card.
Risk engineFourteen checks on every card, plus caps, the daily loss stop, the per-user emergency stop and the trading halt.
Paper engineOrder types, isolated margin, fees, funding, stop and target triggers, liquidation and resting orders, as pure functions over your book.
Market feedOne Hyperliquid info call per few seconds for every market, plus one-minute bars for the extremes since the last check.
Venue adaptersHyperliquid is the only venue with a live path. Elysium is listed with prices and cannot sign an order.
StateYour book, orders and activity are kept on the server and sealed at rest. See Privacy & security.

Gateway#

A session cookie proves who you are after a wallet signature. Writes also need the request to come from the same origin, and the paper order route allows 60 requests a minute per account. The browser holds no secrets and no limits of its own.

Agents#

An agent has a name, a mascot, a model and a style note. Its chat is stored per account. The style note can change tone. It cannot override the reply format, the market data or the guardrails. See Agents & strategies.

Paper engine#

The engine is a set of pure functions: place an order, set triggers, run the clock. It takes a book and a set of quotes and returns a new book and a list of events. It has no network access and cannot reach an exchange. Fills are simulated at the guarded mark with a per-order liquidity cap. There is no order book and no counterparty, so nobody else’s order changes your fill and there is no auto-deleveraging.

Venue adapters#

The live path is serialized through one queue per account and rate limited. It builds a market IOC order whose price is the venue mark plus the slippage cap. The paper engine does not use this path. See Venues.

Order lifecycle#

Inside the paper engine every order passes the same four gates, then ends as a fill, a resting order or a refusal. Refusals change nothing: no fee, no margin, no position.

Ordertype · size · leverageGuarded markfresh and usable?Type rulescross? depth? reduce?Collateralmargin + fee fits?Filltaker at the markRestingmaker at the limitRefusednothing changesClockfunding · stops · liq.okfar limitreject
Every order passes the same four gates. After a fill, each check of the book runs funding, stops, targets, liquidation and resting orders in that order.

What is not here#

  • No cross margin and no portfolio margin. Every position is isolated.
  • No auto-deleveraging. Paper fills never depend on other accounts.
  • No order book depth model. A per-order liquidity cap stands in for it.
  • No background engine. The clock runs on your requests.
Elize Bot is not affiliated with or endorsed by Hyperliquid, Elysium, Kinetiq or Montra. Names are used only to say which venue or chain a feature talks to. Leveraged positions can be liquidated, and a paper result is not a forecast of a real one.