03 / Docs

Spec v1 · Elysium 99901

07 / Launch guide

From empty repo to live ledger.

Three deploys, in this order: contracts on Elysium, backend on Railway, frontend on Vercel. Start in paper mode.

7.1Prerequisites

  1. Node 20+, pnpm 9, and Foundry (foundryup).
  2. A deployer wallet with HYPE on Elysium for gas, plus separate committer and reporter keys.
  3. A Hyperliquid master account with sub-accounts created and one API wallet approved per sub-account.
  4. Railway and Vercel accounts connected to the repository; a WalletConnect project id.

7.2Deploy contracts (Foundry)

Elysium deploybash
cd packages/contracts
forge install
forge test -vv

export ELYSIUM_RPC_URL=https://rpc.elysium.kinetiq.xyz
export DEPLOYER_KEY=0x…          # funded with HYPE on Elysium; use a hardware wallet in production

forge script script/Deploy.s.sol:Deploy \
  --rpc-url $ELYSIUM_RPC_URL \
  --private-key $DEPLOYER_KEY \
  --broadcast --verify --chain-id 99901

# Output:
#   ProofRegistry  0x…
#   BuybackVault   0x…

After deploy, grant the committer role on ProofRegistry and the reporter and keeper roles on BuybackVault, then set the initial high-water mark to the starting bankroll. Record both addresses; they go into both Railway and Vercel.

7.3Backend on Railway

Create a service from the repo with root apps/api, add the Postgres plugin, and set:

Railway variablesenv
# Railway → backend service → Variables
EXECUTION_MODE=PAPER_SIMULATION          # PAPER_SIMULATION | HYPERLIQUID_TESTNET | HYPERLIQUID_MAINNET
ELYSIUM_RPC_URL=https://rpc.elysium.kinetiq.xyz
ELYSIUM_CHAIN_ID=99901
PROOF_REGISTRY_ADDRESS=0x…
BUYBACK_VAULT_ADDRESS=0x…
COMMITTER_PRIVATE_KEY=0x…                # ProofRegistry committer role; holds a little HYPE for gas
REPORTER_PRIVATE_KEY=0x…                 # BuybackVault reporter role
HL_MASTER_ADDRESS=0x…                    # Hyperliquid master account (not the public desk address)
HL_API_WALLET_KEYS=0x…,0x…,0x…           # agent keys, one per sub-account
HL_SUBACCOUNTS=0x…,0x…,0x…
ANTHROPIC_API_KEY=…                      # council model provider
MAX_LEVERAGE=5
MAX_POSITION_USD=25000
DAILY_DRAWDOWN_KILL_PCT=4
DATABASE_URL=postgresql://…              # Railway Postgres plugin
PORT=8080
CORS_ORIGIN=https://your-site.vercel.app

Private keys belong in Railway variables only, never in the repository or any NEXT_PUBLIC_ variable. Expose the service on a public domain; the WebSocket shares the HTTP port at /ws.

7.4Frontend on Vercel

Vercel variablesenv
# Vercel → project (root: apps/web) → Settings → Environment Variables
NEXT_PUBLIC_API_URL=https://desk-api.up.railway.app
NEXT_PUBLIC_WS_URL=wss://desk-api.up.railway.app/ws
NEXT_PUBLIC_ELYSIUM_RPC_URL=https://rpc.elysium.kinetiq.xyz
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=…
NEXT_PUBLIC_PROOF_REGISTRY=0x…
NEXT_PUBLIC_BUYBACK_VAULT=0x…
NEXT_PUBLIC_TOKEN_ADDRESS=0x…
VariableUsed for
NEXT_PUBLIC_API_URLREST base for stats, trades, burns, council
NEXT_PUBLIC_WS_URLLive updates on the desk and ledger
NEXT_PUBLIC_ELYSIUM_RPC_URLIn-browser verification and wallet chain config
NEXT_PUBLIC_WALLETCONNECT_PROJECT_IDRainbowKit / WalletConnect
NEXT_PUBLIC_PROOF_REGISTRYgetTrade() reads for independent verification
NEXT_PUBLIC_BUYBACK_VAULTHWM and reserve reads
NEXT_PUBLIC_TOKEN_ADDRESSBurned-balance reads at 0x…dEaD

7.5Go-live checklist

  1. Run at least two weeks in PAPER_SIMULATION; every paper trade should reach VERIFIED.
  2. Switch to HYPERLIQUID_TESTNET; confirm rotation, stops and receipts against testnet fills.
  3. Trigger the kill switch deliberately on testnet and confirm the book flattens and entries halt.
  4. Fund mainnet sub-accounts, set EXECUTION_MODE=HYPERLIQUID_MAINNET, redeploy.
  5. Publish the contract addresses and the company wallet on the site and in /llms.txt.

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