.env file at the repository root. The .env.example file provides a template with safe placeholder values.
Environment variables
Required
Optional
Fee configuration
Fees are specified in basis points throughFEE_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
WhenFACTORY_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.
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
Thehardhat.config.js file defines the Sepolia network and compiler settings:
package.json: