ON1Builder

file_000000006c1061fab66922c93267144c

Built With Python GitHub last commit Ethereum Mainnet

Table of Contents

  1. Executive Summary
  2. Project Overview
  3. Architecture and Components
    3.1. Environment & Configuration
    3.2. Smart Contracts
    3.3. Python Modules
       3.3.1. APIConfig
       3.3.2. MarketMonitor
       3.3.3. TransactionCore
       3.3.4. StrategyNet
       3.3.5. NonceCore
       3.3.6. SafetyNet
       3.3.7. MainCore
       3.3.8. ABI Registry & Logging
    3.4. User Interface / Dashboard
  4. Key Features and Statistics
    4.1. Flashloan and Arbitrage Strategies
    4.2. Market Monitoring & Machine Learning
    4.3. Transaction Execution and Safety
    4.4. Testing and Reliability
  5. Project Dependencies and Ecosystem
  6. Future Enhancements and Considerations
  7. Installation, Configuration & Usage
    7.1. Prerequisites
    7.2. Installation Steps
    7.3. Configuration
    7.4. Usage
    7.5. Contributing
    7.6. License
  8. Appendix: Charts and Diagrams
  9. Disclaimer

1. Executive Summary

ON1Builder is a versatile Maximal Extractable Value (MEV) flashloan arbitrage bot operating on Ethereum’s mainnet and testnets. It integrates:

This end‑to‑end platform empowers traders to deploy atomic arbitrage and sandwich strategies with maximum reliability and minimum configuration overhead.


2. Project Overview


3. Architecture and Components

Environment & Configuration

Smart Contracts

Python Modules

APIConfig

MarketMonitor

TransactionCore

StrategyNet

NonceCore

SafetyNet

MainCore

ABIRegistry & LoggingConfig

User Interface / Dashboard


4. Key Features and Statistics

4.1 Flashloan and Arbitrage Strategies

Strategy Description Key Parameters
Flashloan Execution Requests and executes flashloans using Aave’s protocols Flashloan amount, asset, referral codes
Front-run Preempts high‑value pending transactions by accelerating gas usage Gas price multiplier, risk thresholds, predicted price
Aggressive & Predictive FR Uses risk scoring and ML forecasts to preemptively execute trades Aggressive thresholds; predicted price increase (%)
Back-run & Price Dip BR Executes trades following target transactions to profit on a price dip Price dip threshold, volume metrics
Sandwich Attack Combines flashloan, front‑run, and back‑run to capture sandwich profits Integrated multi‑step execution with strict profit margins

4.2 Market Monitoring & Machine Learning

4.3 Transaction Execution and Safety

4.4 Testing and Reliability

5. Project Dependencies and Ecosystem


6. Future Enhancements and Considerations


7. Installation, Configuration & Usage

🐱‍💻 Security Warning
Don’t even trust your cats. They’re sneaky and can’t be trusted.

If you paste your private key in plaintext, congrats — you just gave your wallet the same security as a sticky note on a park bench.

Keep it encrypted, offline, and far away from prying eyes (or “oops” deployments).

Remember: one leak, and your ETH becomes someone else’s exit liquidity.

Not your opsec, not your coins. 🔐😼

7.1 Prerequisites


7.2 Installation Steps

git clone https://github.com/John0n1/ON1Builder.git
cd ON1Builder
python3 -m venv venv
source venv/bin/activate       # Linux/macOS
# .\venv\Scripts\activate      # Windows
pip install --upgrade pip
pip install -r requirements.txt

7.3 Configuration

Copy and edit the example .env:

cp .env.example .env
nano .env

Example .env

# API Keys & Endpoints
ETHERSCAN_API_KEY=YOUR_ETHERSCAN_KEY 
INFURA_PROJECT_ID=YOUR_INFURA_PROJECT_ID # Optional
COINGECKO_API_KEY=YOUR_COINGECKO_API_KEY 
COINMARKETCAP_API_KEY=YOUR_CMC_API_KEY 
CRYPTOCOMPARE_API_KEY=YOUR_CC_API_KEY  

# Provider IPC/HTTP/WS
IPC_ENDPOINT=~/ON1Builder/geth.ipc
HTTP_ENDPOINT=http://127.0.0.1:8545
WEBSOCKET_ENDPOINT=wss://127.0.0.1:8545

# Wallet
WALLET_ADDRESS=0xYourEthereumAddress
WALLET_KEY=0xYourPrivateKey 

7.4 Usage

Running the Bot

# Start clients
# geth and prysm should already be running as per Section 7.4.1/2

# In project root
source venv/bin/activate    # or venv\Scripts\activate on Windows
python python/main.py

7.4.1 Geth (Execution Client) Setup

Install and run Geth in IPC-only mode:

# Install Geth on Ubuntu
sudo apt update && sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt update && sudo apt install -y geth              

# Run with snap sync
geth \
  --syncmode snap \                                 
  --mainnet \
  --http=false \
  --ipcpath /ON1Builder/geth.ipc \
  --cache 12000 \
  --maxpeers 80                                        

7.4.2 Prysm (Beacon Node) Setup

Install Prysm and run in IPC mode (no JWT):

# Install Prysm
curl https://raw.githubusercontent.com/prysmaticlabs/prysm/master/prysm.sh \
  --output prysm.sh && chmod +x prysm.sh                 

# Run beacon node, linking to Geth IPC
./prysm.sh beacon-chain \
  --execution-endpoint=/ON1Builder/geth.ipc \
  --mainnet \
  --checkpoint-sync-url=https://beaconstate.info \
  --genesis-beacon-api-url=https://beaconstate.info

7.4.3 Free‑Tier API Keys

Provider Free Tier Highlights
Infura 3 million credits/day, 1 API key
Coingecko Free API key, (trial)
Etherscan 100 k calls/day, 5 calls/s
CoinMarketCap Free API key, (trial)
Cryptocompare Free API key, (trial)

7.4.4 Flashloan Deployment via Remix

  1. Open Remix and paste SimpleFlashloan.sol (importing Aave V3’s base contract).
  2. Compile with Solidity 0.8.10.
  3. Connect MetaMask (inject Web3) using a free RPC from one of your providers.
  4. Deploy to mainnet by providing the correct PoolAddressesProvider address for AAVE V3.

See QuickNode’s tutorial for full Remix walkthrough and contract code.


7.5 Contributing

  1. Fork & branch
  2. Adhere to PEP8 & add tests
  3. Submit a detailed PR
    • (see CONTRIBUTING)

7.6 License


8. Appendix: Charts and Diagrams

Component Summary

Component Function Location/Module
Environment Config Load & validate .env configuration.py
Smart Contracts Flashloan & DEX interactions SimpleFlashloan.sol, abi/
Market Monitor Data ingestion & ML forecasting marketmonitor.py
Transaction Engine Tx building, signing & execution transactioncore.py
Strategy Selector RL‑based MEV strategy selection strategynet.py
Nonce Manager High‑throughput nonce tracking noncecore.py
Risk Manager Profit & safety checks safetynet.py
Orchestrator Main event loop & health checks maincore.py
Dashboard UI Live metrics & control ui/index.html

Data Flow Diagram

Data Flow


Table 2:Performance Metrics (Dynamic Values)

| Metric | Value | Unit | |——————————|———————–|————| | Transaction Success Rate | 95.6 | % | | Average Execution Time | 1.35 | seconds | | Profitability | 0.256 | ETH | | Gas Usage | 21000 | units | | Network Congestion | 45.2 | % | | Slippage | 0.1 | fraction | | Account Balance | 12.5 | ETH | | Transactions Executed | 185 | count | —

ON1Builder Logo

9. Disclaimer

Disclaimer: Use at your own risk—MEV flashloans incur financial risk.