Minimal bump bot for ZKStaker. This repo is intentionally small and focused on bump execution.
See the simplification blueprint: docs/zkstaker-bump-bot.md.
Copy .env.example to .env and fill in values.
RPC_URL— JSON-RPC endpoint for ZKSync.CHAIN_ID— Chain ID for the network.STAKER_PROXY_ADDRESS— Proxy address for the ZKStaker contract.STAKER_CONTRACT_ADDRESSis accepted as a legacy alias but must also point at the proxy.
EARNING_POWER_CALCULATOR_ADDRESS— Override for the earning power calculator. If unset, the runtime will resolve it from the proxy/event.START_BLOCK— Starting block for monitoring (default0).POLL_INTERVAL_MS— Polling interval in milliseconds (default30000).LOG_LEVEL—debug | info | warn | error(defaultinfo).
BUMP_TIP_RECEIVER— Receiver for the bump tip (default zero address).BUMP_TIP_AMOUNT— Tip amount in wei (default0).BUMP_COOLDOWN_MS— Cooldown between checks per deposit (default300000).BUMP_MAX_ATTEMPTS— Max attempts per deposit before pausing checks (default5).BUMP_SCHEDULER_INTERVAL_MS— Scheduler cadence (default30000).BUMP_EXECUTION_INTERVAL_MS— Executor cadence (default30000).DEPOSIT_IDS— Comma-separated deposit IDs to monitor. If empty, the bot will discover active deposits by watchingStakeDeposited/StakeWithdrawnevents starting atSTART_BLOCK.
EXECUTOR_STRATEGY—wallet(default) orrelayer.WALLET_PRIVATE_KEY— Private key for the wallet strategy (required whenEXECUTOR_STRATEGY=wallet).CONFIRMATION_BLOCKS— Receipt confirmations to wait for (default1).REORG_DEPTH— Reorg depth budget for monitoring (default0; currently informational).
COMPONENTS—all(default) or a comma-separated list ofmonitor,bump,executor.
DATABASE_PATH— Path to the JSON database file (default./data/zksync-staker.json).
- Copy
.env.exampleto.envand set required fields. - Set
DEPOSIT_IDSto the deposit IDs you want to monitor. - Provide
WALLET_PRIVATE_KEYfor wallet execution. - Run
npm run buildthennode dist/index.js(ornpm run bump-botfor the slim bump-bot entry point).
- Use chain ID
324for mainnet and confirm your RPC provider supports ZKSync. - Always use the proxy address for runtime calls and the calculator override if needed.
- Defender relayers on ZKSync may require explicit gas limits; use the relayer sender only when the relayer is configured for ZKSync.
CONFIRMATION_BLOCKS=1is a safe default; increase for higher finality assurances.
- Tip defaults to zero; set
BUMP_TIP_AMOUNTto enable tips. - When using
COMPONENTS, omitexecutorto disable transaction submission.