DocsDevelopment

Environment Variables

Every environment variable in the repository — what it does, who reads it, and safe defaults.

All variables are documented in .env.example. Copy it to a gitignored .env (cp .env.example .env) and fill in only what you need. Never commit .env; never put real secrets in examples or docs.

Network / RPC

VariableUsed byPurpose
RH_TESTNET_RPC_URLkeeper, deploy scripts (robinhood_testnet endpoint)Testnet 46630 RPC
NEXT_PUBLIC_RH_TESTNET_RPC_URLappTestnet RPC in the browser
RH_RPC_URLkeeper, deploy scripts (robinhood endpoint)Mainnet 4663 RPC
NEXT_PUBLIC_RH_RPC_URLappMainnet RPC in the browser
RH_WS_URLkeeperOptional WebSocket endpoint
CHAIN_IDkeeper, scripts46630 (default) or 4663
NEXT_PUBLIC_CHAIN_IDappChain the app targets

Keys and ownership

VariableUsed byPurpose
PRIVATE_KEYdeploy scripts, keeperBroadcaster / signer. Keep empty in .env.example; real key only in local .env.
OWNERdeploy scriptsContract owner; must equal the broadcaster for mainnet scripts
KEEPER_ADDRESSdeploy scripts, keeperThe vault's keeper address; also the from for live submits

Desk / deploy wiring

VariableUsed byPurpose
USDG_ADDRESSdeploy scriptsOfficial USDG for the target chain; mainnet scripts reject anything but 0x5fc5…b168
LEADER_ADDRESSdeploy scripts, keeperBootstrap leader (also keeper fallback)
LEADER_2, LEADER_3DeployPhase2Additional leaders; unset ⇒ that desk is skipped
DESK_ADDRESSkeeperSingle-desk binding
DESK_ADDRESSESkeeperComma-separated multi-desk list
DESK_FACTORY / FACTORY_ADDRESSkeeperWalk factory.allDesks when no desk list is set
PROTOCOL_FEE_RECIPIENTdeploy scriptsTreasury for the protocol fee share (defaults to OWNER)

Phase 2 / TGE

VariableUsed byPurpose
SEAT_HOLDERDeployPhase2Receives the 1B $SEAT mint (defaults to OWNER)
LISTING_BOND_SEATDeployPhase2Listing bond (default 100_000e18)
POSITION_MANAGER_ADDRESSoperatorCited Uniswap v3 NPM on 4663 (0x7399…E0D3); LP mint stays manual
SEAT_LP_USDGDeployPhase2If set, logs LP seeding intent; the script never mints the position
CONFIRM_MAINNETDeployMainnet, DeployPhase2Must be I_UNDERSTAND to broadcast on 4663
CONFIRM_SEAT_TGEDeployPhase2Second confirm required for the TGE

Risk / fee tuning (optional)

VariableDefault in scripts
MAX_FILL_USDGtestnet: unset (skips configureDesk); mainnet: 5,000 USDG
MAX_POSITION_USDGtestnet 5,000 / mainnet 20,000 USDG
MAX_GROSS_USDGtestnet 10,000 / mainnet 50,000 USDG
MAX_DRAWDOWN_BPS2,000 (20%)
MAX_STALENESS_SEC120
DEPOSIT_CAP_USDG50,000 USDG (mainnet)
SWAP_POOL_FEE3000

Execution guards

VariablePurpose
EXECUTION_MODEPAPER (default) or LIVE
SWAP_ROUTER_ADDRESSTestnet-only hook for SwapAdapter.setRouter; leave empty on 46630 — none is cited
SWAP_ROUTER_CONFIGURED1 only after a 4663 ExactInputRouter02 is live
SEAT_SUBMIT_TX1 to actually broadcast keeper copies; 0 = dry-run with encoded calldata

Site (this documentation)

VariablePurpose
NEXT_PUBLIC_SEAT_PRODUCT_URL"Product" link target (renders disabled "Launching soon" when unset)
NEXT_PUBLIC_SEAT_X_URLX/Twitter link (defaults to https://x.com/seatdesks)
NEXT_PUBLIC_SEAT_SITE_URLCanonical site URL for metadata/sitemap

Safe example

env
# .env — gitignored. Testnet development, paper keeper.
RH_TESTNET_RPC_URL=<your-testnet-rpc-url>
NEXT_PUBLIC_RH_TESTNET_RPC_URL=<your-testnet-rpc-url>
CHAIN_ID=46630
NEXT_PUBLIC_CHAIN_ID=46630
PRIVATE_KEY=<your-private-key>
USDG_ADDRESS=0x7E955252E15c84f5768B83c41a71F9eba181802F
OWNER=<your-deployer-address>
LEADER_ADDRESS=<opted-in-leader-address>
EXECUTION_MODE=PAPER