Operations
Environment variables
Every variable for the site and API on Vercel, and for the engine.
Vercel (site, app and API)
Also listed in .env.example. Variables starting with NEXT_PUBLIC_ are built into the site, so changing one needs a redeploy.
| Variable | Needed? | What it does |
|---|---|---|
DATABASE_URL | Yes | Neon pooled connection string. Without it the app shows live prices and on-chain data only |
ADMIN_TOKEN | Recommended | Turns on the admin calls. 24+ characters |
MOTION_TOKEN | After launch | MOTION's token address. Must match the engine |
STANDIN_TOKEN | No | The Montra pool used before launch. Must match the engine if set there |
HL_ACCOUNT | Live mode | The protocol's HyperCore account; linked in the app |
SWAP_ADAPTER_ADDRESS | Live mode | Shown in the app's contract list |
NAV_REPORTER_ADDRESS | Live mode | Shown in the app's contract list |
ELYSIUM_RPC_URL | No | Default https://rpc.elysium.kinetiq.xyz |
HL_NETWORK | No | testnet makes /config report Hyperliquid testnet |
NEXT_PUBLIC_API_URL | No | Only if the API runs somewhere else (the app appends /api/v1) |
NEXT_PUBLIC_MOCK_DATA | Leave empty | 1 shows invented data to every visitor. Never on the public site |
Engine
Also listed in engine/.env.example. Validated at start; a bad value stops the engine and the log names it.
Core
| Variable | Default | What it does |
|---|---|---|
DATABASE_URL | required | Neon direct string. Same database as Vercel |
EXECUTION_MODE | paper | paper = simulated fills. live = real money |
PORT | 8080 | HTTP port (Render sets it) |
ELYSIUM_RPC_URL | https://rpc.elysium.kinetiq.xyz | |
MOTION_TOKEN | none | MOTION's address once launched |
STANDIN_TOKEN | UNSEEN 0x6d15…2819 | The live Montra pool to practise on before launch |
ENGINE_SERVES_API | false | true also serves /api/v1 from the engine |
LOG_FORMAT | none | json for hosted logs |
LOG_LEVEL | info | debug, info, warn, error |
Paper
| Variable | Default | What it does |
|---|---|---|
PAPER_CAPITAL_USD | 25000 | Size of the pretend treasury |
PAPER_RESET | false | true wipes the paper books on the next start. Set it back afterwards |
Strategies and risk
| Variable | Default | What it does |
|---|---|---|
HEDGE_RATIO | 0.5 | Share of held HYPE kept short on the perp |
MAX_DRAWDOWN_BPS | 1000 | Drawdown from the 24 h peak that halts everything (10 %) |
MM_MARKETS | HYPE-USDC,KNTQ-USDC | HyperCore spot markets to quote |
MONTRA_BAND_BPS | 600 | How far the pool must stray from fair value before trading |
MONTRA_MAX_TRADE_HYPE | 1 | Largest single pool trade, in HYPE |
MIN_HARVEST_HYPE | 0.25 | Pending fees before the engine claims them (live) |
ARB_HL_COIN | none | MOTION's HyperCore spot coin (like @1234). Turns arbitrage on |
SNAPSHOT_SECONDS | 60 | How often the vault's value is saved |
Live mode only (secrets)
Put them in the host's secret store, never in a file in git.
| Variable | What it is |
|---|---|
CONFIRM_LIVE | Must be exactly yes, together with EXECUTION_MODE=live |
OPERATOR_KEY | Private key of the Treasury's keeper. Also pays gas for fee claims |
HL_ACCOUNT | The protocol's HyperCore account address |
HL_AGENT_KEY | Private key of a Hyperliquid API wallet approved by that account. It can trade but not withdraw |
HL_NETWORK | mainnet (default) or testnet |
SWAP_ADAPTER_ADDRESS | The deployed MontraSwapAdapter (required for live Montra trading) |
NAV_REPORTER_ADDRESS | The deployed NavReporter (read but not used by the engine yet) |
ADMIN_TOKEN | Only with ENGINE_SERVES_API, for admin calls on the engine's port |
Addresses must be 0x + 40 hex characters and keys 0x + 64. The engine refuses to start in live mode unless CONFIRM_LIVE, OPERATOR_KEY, HL_ACCOUNT and HL_AGENT_KEY are all set.
Maintenance
| Variable | What it does |
|---|---|
MIGRATE_ONLY | 1 applies the migrations and exits (cd engine && npm run migrate) |
MIGRATIONS_DIR | Overrides where the migrations are read from |