03 / Docs

Spec v1 · Elysium 99901

02 / Private execution

Trade in public. Be followed by no one.

The desk's track record is public; its live positions are not. Orders are signed by short-lived Hyperliquid API wallets on sub-accounts that share no visible funding path with the desk address, so the only thing an observer sees mid-trade is a hash.

2.1Routing

Hyperliquid lets a master account approve API wallets (also called agent wallets): keys that can place and cancel orders for an account but cannot withdraw or transfer funds. The desk combines that with sub-accounts, each with its own address and margin. The public desk address never places an order itself.

LayerHolds fundsSigns ordersPublicly linked to desk
Treasury (cold)YesNoYes — published
Master trading accountYesNo (approves agents only)No
Sub-accounts (pool of N)Margin per tradeNoNo
API wallets (one per sub-account)NoYesNo

2.2Wallet rotation

  • Each new trade draws a random free slot (sub-account + API wallet) from the pool. A slot with an open position is never reused.
  • A slot cools down for at least 6 hours after its last close before it can be drawn again, so timing analysis cannot chain trades.
  • API wallet approvals expire and are re-issued on a schedule; a leaked agent key can trade one sub-account's margin but cannot move funds.
  • Margin is topped up from the master account in rounded amounts at randomised times, not just before a trade.
  • After reveal, the sub-account address is published with the receipt. That slot is then retired from the pool permanently.
executor/slots.tstypescript
// Simplified from the executor. One signer per trade, retired after use.
interface ExecSlot {
  subAccount: `0x${string}`;   // Hyperliquid sub-account that holds margin
  apiWallet:  `0x${string}`;   // approved agent key: can trade, cannot withdraw
  lastUsedAt: number;
  openPositions: number;
}

function pickSlot(pool: ExecSlot[], now: number): ExecSlot {
  const free = pool.filter(s => s.openPositions === 0 && now - s.lastUsedAt > 6 * 3600_000);
  if (free.length === 0) throw new Error("NO_FREE_SLOT"); // trade is skipped, never forced
  return free[crypto.getRandomValues(new Uint32Array(1))[0] % free.length];
}

2.3Execution modes

The backend runs in exactly one mode, set by EXECUTION_MODE. The current mode is returned in GET /api/stats as mode and shown in the site header, so nobody mistakes a simulation for live money.

ModeOrdersCommitsUse
PAPER_SIMULATIONSimulated against live Hyperliquid mid/L2 data, with fees and slippage modelledReal, on ElysiumDefault. Proves the pipeline end-to-end with no capital at risk.
HYPERLIQUID_TESTNETReal orders on Hyperliquid testnetReal, on ElysiumExercises API wallets, rotation and receipts.
HYPERLIQUID_MAINNETReal orders, real marginReal, on ElysiumProduction. Requires every guardrail env var to be set explicitly.

2.4Risk guardrails

These limits are enforced in code by the risk module before commit, and again by the executor before order submission. The Risk Manager agent can tighten them, never loosen them.

GuardrailLimitEnforcementOn breach
Max leverage5xPer position, computed on notional / sub-account equityVETO
Stop-lossMandatoryReduce-only trigger order sent in the same batch as entryVETO; position closed if SL is ever missing
Max position$25,000 notionalPer position, across all sub-accounts per pairVETO
Daily drawdown4% of start-of-day equityRealised + unrealised, checked every 10 sKill switch: flatten all, no entries until 00:00 UTC
PairsBTC, ETH, HYPE, SOLAllow-listVETO
Commit before orderRequiredExecutor refuses without a mined commit txOrder not sent

2.5Order sequence

One trade, end to endpseudo
1  council.decide()                 -> { pair, side, sizeUsd, entryTarget, stop, thesisJson }
2  risk.check(decision, account)    -> OK | VETO(reason)            // hard limits, see table
3  salt = randomBytes32()
   commitHash = computeCommitHash({ tradeId, thesisJson, pair, side, sizeUsd, entryTarget, salt })
4  ProofRegistry.commit(tradeId, commitHash)   -> wait 1 confirmation on Elysium
5  slot = pickSlot(pool)
6  hl.order(slot.apiWallet, { coin: pair, isBuy, sz, limitPx: entryTarget, reduceOnly: false })
   hl.order(slot.apiWallet, { trigger: stop, tpsl: "sl", reduceOnly: true })   // same request batch
7  ...position managed until stop / target / invalidation...
8  fills = hl.userFills(slot.subAccount, since: commitTs)
   receipt = sign(executionKey, keccak256(fills))
9  ProofRegistry.reveal(tradeId, thesisJson, pair, side, sizeUsd, entryTarget, salt, receipt)
  1. If step 4 fails or times out, the trade is abandoned. A commit without an order is harmless and is revealed as a no-fill.
  2. If the entry doesn't fill within its time limit, it is cancelled and the commit is revealed with an empty fill set.
  3. The reveal format is described in the commit–reveal spec; the contract surface in Contracts.

Commit before trade.
Prove after close.

Every entry is keccak256-sealed on Elysium (chain 99901) before an order touches Hyperliquid. Profit above the high-water mark splits 70/20/10: burn, compound, ops.

Company ops wallet · 10% of sweeps

Risk: max 5x leverage · stop required on every order · 4% daily drawdown kills the desk until next session.

Quietdesk · not investment adviceBTC · ETH · HYPE · SOL perps