Skip to main content
SplitBot is configured entirely through environment variables in a .env file at the repository root. The .env.example file provides a template with safe placeholder values.

Environment variables

Required

Optional

Never commit .env to version control. The .gitignore already excludes it. Never use your main wallet private key for DEPLOYER_PRIVATE_KEY.

Fee configuration

Fees are specified in basis points through FEE_PERCENT_BPS: The bot supports a legacy FEE_PERCENT variable (as a float percentage like 0.5) and auto-converts it to basis points if FEE_PERCENT_BPS is not set. The fee is computed as fee-on-top: each participant’s deposit is slightly more than their share so the target receives the exact requested amount.

Factory deployment

When FACTORY_ADDRESS is set, the bot deploys escrow contracts through the SplitEscrowFactory using CREATE2. This provides:
  • Deterministic contract addresses that participants can verify before depositing.
  • A fixed deployment pathway: all escrows share the same verified bytecode.
  • Key rotation safety: swapping the deployer key does not affect past escrows.
When FACTORY_ADDRESS is empty, the bot falls back to direct constructor deployment.

Mini App configuration

The Mini App (miniapp/ directory) is a static site with build-time pinned constants in index.html:
These constants are intentionally not URL-controllable. This prevents phishing attacks where a deeplink redirects users to a malicious chain or RPC endpoint.

Hardhat configuration

The hardhat.config.js file defines the Sepolia network and compiler settings:
Available scripts from package.json: