pip install on1builder
Async, multi-chain MEV/arbitrage engine with safety rails, flashloan support, and live telemetry. Highly customizable via config.
ON1Builder is a modular MEV searcher framework designed for building and deploying arbitrage, front-running, and back-running strategies across multiple EVM-compatible blockchains. It emphasizes safety, configurability, and observability, making it suitable for both development and production environments.
| Track | Summary |
|---|---|
| Core Focus | MEV searcher: arbitrage, back/front-run, flashloans |
| Chains | Ethereum ready (public RPC OK); multi-chain capable |
| Safety | Slippage caps, gas ceilings, balance tiers, emergency stop |
| Telemetry | Heartbeats, perf summaries, structured logs, notifications |
git clone https://github.com/John0n1/ON1Builder.git
cd ON1Builder
python -m venv .venv
. .venv/Scripts/activate
pip install -r requirements.txt
pip install -e .
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .
copy .env.example .env
# edit:
# WALLET_KEY, WALLET_ADDRESS
# RPC_URL_1="https://ethereum-rpc.publicnode.com"
# WEBSOCKET_URL_1="wss://ethereum-rpc.publicnode.com" # public WS is auto-skipped for txpool
# ETHERSCAN_API_KEY=...
python -m on1builder status check
python -m on1builder run start
With public RPC/WS, txpool scanning is disabled on purpose (unreliable pending tx support). Provide a private WS endpoint if you want pending tx monitoring.
| Setting | Description |
|---|---|
WALLET_KEY, WALLET_ADDRESS |
Required for signing/monitoring |
RPC_URL_1 |
HTTP RPC endpoint (public OK) |
WEBSOCKET_URL_1 |
WS endpoint; use private if you want txpool scanning |
ETHERSCAN_API_KEY |
Optional but recommended for ABI/tx metadata |
MIN_PROFIT_ETH |
Profit floor per trade (ETH) |
MAX_GAS_PRICE_GWEI |
Hard gas ceiling |
SUBMISSION_MODE |
public, private, or bundle (relay submission) |
PRIVATE_RPC_URL |
Private RPC endpoint (Flashbots Protect, etc.) |
BUNDLE_RELAY_URL |
Bundle relay endpoint (MEV-Boost/Flashbots) |
SIMULATION_BACKEND |
eth_call, anvil, or tenderly |
SIMULATION_CONCURRENCY |
Max concurrent simulations |
NOTIFICATION_CHANNELS |
slack,telegram,discord,email (blank = off) |
ORACLE_FEEDS |
JSON map of chain_id → symbol → Chainlink feed address |
ORACLE_STALE_SECONDS |
Max age (seconds) before oracle price is treated as stale |
MARKET_PRICE_PERSIST_INTERVAL |
Persist price snapshots to DB every N seconds (0 disables) |
STARTUP_TEST_TRANSACTION |
Run a diagnostic self-tx on startup (requires ALLOW_INSUFFICIENT_FUNDS_TESTS) |
ALLOW_INSUFFICIENT_FUNDS_TESTS |
Bypass local balance checks for test sends (debug only) |
Full list lives in .env.example.
PublicNode endpoints can be used for EVM chains listed in .env.example. Non-EVM endpoints
(Sui, Aptos, Osmosis, Avalanche P/X, Polygon Heimdall) are not supported by ON1Builder.
# Validate config
python -m on1builder status check
# Start bot
python -m on1builder run start
# View logs
tail -f logs/on1builder.log # *nix
Get-Content logs\\on1builder.log -Wait # Windows
Heartbeats report balance tier, pending tx count (0 if txpool scanner is disabled), and memory usage.
python -m pytest # fast/local tests
RUN_LIVE_API_TESTS=1 python -m pytest tests/test_external_api_logic.py
black src tests && flake8 src tests && mypy src
Pre-commit hooks are configured in .pre-commit-config.yaml.
ON1Builder ships a few utilities that are not required for core execution but can be integrated in advanced deployments:
src/on1builder/utils/error_recovery.py: Retry/circuit-breaker helpers and a recovery
manager. The TransactionManager now reports failures to this manager for tracking and
optional recovery strategies, but most strategies are placeholders by default.src/on1builder/utils/container.py: A lightweight DI container for advanced lifecycle
management. The core runtime does not use it yet; opt in if you want centralized wiring.You need to deploy your own flashloan provider contract or use an existing one. Make sure to configure the flashloan provider address in your strategy settings.
To learn about deploying a flashloan contract, refer to the documentation of the flashloan provider you intend to use (e.g., Aave, dYdX) we recommend Aave
Here’s a basic outline of the steps involved:
The bot is able to function without API keys, but some features are limited. It’s recommended to set up the following free API keys for best experience:
MIT - see LICENSE.
Use at your own risk. No warranty. MEV strategies can be volatile and may incur losses. Keep keys safe; never use production keys on public demos.