Docs / Development
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
Variable Used by Purpose RH_TESTNET_RPC_URLkeeper, deploy scripts (robinhood_testnet endpoint) Testnet 46630 RPC NEXT_PUBLIC_RH_TESTNET_RPC_URLapp Testnet RPC in the browser RH_RPC_URLkeeper, deploy scripts (robinhood endpoint) Mainnet 4663 RPC NEXT_PUBLIC_RH_RPC_URLapp Mainnet RPC in the browser RH_WS_URLkeeper Optional WebSocket endpoint CHAIN_IDkeeper, scripts 46630 (default) or 4663NEXT_PUBLIC_CHAIN_IDapp Chain the app targets
# Keys and ownership
Variable Used by Purpose PRIVATE_KEYdeploy scripts, keeper Broadcaster / signer. Keep empty in .env.example; real key only in local .env. OWNERdeploy scripts Contract owner; must equal the broadcaster for mainnet scripts KEEPER_ADDRESSdeploy scripts, keeper The vault's keeper address; also the from for live submits
# Desk / deploy wiring
Variable Used by Purpose USDG_ADDRESSdeploy scripts Official USDG for the target chain; mainnet scripts reject anything but 0x5fc5…b168 LEADER_ADDRESSdeploy scripts, keeper Bootstrap leader (also keeper fallback) LEADER_2, LEADER_3DeployPhase2Additional leaders; unset ⇒ that desk is skipped DESK_ADDRESSkeeper Single-desk binding DESK_ADDRESSESkeeper Comma-separated multi-desk list DESK_FACTORY / FACTORY_ADDRESSkeeper Walk factory.allDesks when no desk list is set PROTOCOL_FEE_RECIPIENTdeploy scripts Treasury for the protocol fee share (defaults to OWNER)
# Phase 2 / TGE
Variable Used by Purpose SEAT_HOLDERDeployPhase2Receives the 1B $SEAT mint (defaults to OWNER) LISTING_BOND_SEATDeployPhase2Listing bond (default 100_000e18) POSITION_MANAGER_ADDRESSoperator Cited 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)
Variable Default 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
Variable Purpose EXECUTION_MODEPAPER (default) or LIVESWAP_ROUTER_ADDRESSTestnet-only hook for SwapAdapter.setRouter; leave empty on 46630 — none is cited SWAP_ROUTER_CONFIGURED1 only after a 4663 ExactInputRouter02 is liveSEAT_SUBMIT_TX1 to actually broadcast keeper copies; 0 = dry-run with encoded calldata
# Site (this documentation)
Variable Purpose 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 Copy
# .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← Previous Development Setup Next → Commands