on1builder


Nameon1builder JSON
Version 2.2.1 PyPI version JSON
download
home_pageNone
SummaryA high-performance, multi-chain MEV and trading bot framework.
upload_time2025-07-13 22:54:22
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords blockchain ethereum trading mev arbitrage defi flashloan crypto bot automated-trading web3 uniswap multi-chain async framework
VCS
bugtrack_url
requirements aiohappyeyeballs aiohttp aiosignal aiosqlite annotated-types attrs Automat bitarray build buildtools cachetools certifi charset-normalizer ckzg colorlog constantly cytoolz docopt eth-account eth-hash eth-keyfile eth-keys eth-rlp eth-typing eth-utils eth_abi frozenlist furl greenlet hexbytes hyperlink idna incremental Jinja2 MarkupSafe multidict numpy orderedmultidict packaging parsimonious pathlib propcache psutil pyaml pycryptodome pydantic pydantic_core pydantic-settings pyproject_hooks python-dateutil python-dotenv pyunormalize PyYAML questionary redo regex requests rich rlp setuptools simplejson six SQLAlchemy toolz Twisted types-requests typing typing-inspection typing_extensions typer urllib3 web3 websockets yarl zope.interface
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ON1Builder MEV Bot

[![Python 3.11+](https://img.shields.io/badge/Python-3.11+-blue.svg?logo=python&logoColor=white)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?logo=github)](https://opensource.org/licenses/MIT)
[![PyPI Version](https://img.shields.io/pypi/v/on1builder?logo=pypi&logoColor=white)](https://pypi.org/project/on1builder/)

[![Warning](https://img.shields.io/badge/⚠️-Development%20Build-red.svg)](https://github.com/john0n1/ON1Builder)



A sophisticated, Maximum Extractable Value (MEV) bot designed for multi-chain arbitrage, front-running, advanced DeFi strategies - utilizing Flashloans via Aave V3. Built with enterprise-grade architecture, comprehensive safety mechanisms, and real-time market analysis.

##  Features

### Core Capabilities
- **Multi-Chain Support**: Simultaneous operations across Ethereum, Polygon, Arbitrum, and other EVM-compatible chains
- **Advanced MEV Strategies**: Arbitrage, front-running, back-running, and sandwich attacks (configurable)
- **Flash Loan Integration**: Automated flash loans from Aave V3 for capital-efficient strategies
- **Real-Time Market Analysis**: Live price feeds, liquidity monitoring, and market sentiment analysis
- **Machine Learning Optimization**: Adaptive strategy weights based on historical performance

### Safety & Risk Management
- **Multi-Layer Safety Guards**: Transaction validation, slippage protection, and emergency stops
- **Dynamic Risk Assessment**: Real-time portfolio risk calculation and position sizing
- **Gas Optimization**: Intelligent gas pricing with EIP-1559 support and cost minimization
- **Balance Management**: Automated balance monitoring with emergency thresholds

### Monitoring & Analytics
- **Comprehensive Logging**: Structured logging with configurable verbosity levels
- **Performance Metrics**: Real-time profit tracking, success rates, and ROI analysis
- **Multi-Channel Notifications**: Slack, Telegram, Discord, and email alerts
- **Database Integration**: SQLite/PostgreSQL support for transaction and profit history

##  Architecture

```
├── src/on1builder/
│   ├── core/                 # Core orchestration and chain management
│   │   ├── main_orchestrator.py      # Main application controller
│   │   ├── multi_chain_orchestrator.py # Cross-chain coordination
│   │   ├── chain_worker.py           # Per-chain operation handler
│   │   ├── transaction_manager.py    # Transaction execution
│   │   └── balance_manager.py        # Portfolio management
│   ├── engines/              # Strategy execution engines
│   │   ├── strategy_executor.py      # MEV strategy implementation
│   │   └── safety_guard.py          # Risk management
│   ├── monitoring/           # Market data and transaction monitoring
│   │   ├── market_data_feed.py      # Price feeds and market analysis
│   │   └── txpool_scanner.py        # Mempool monitoring
│   ├── integrations/         # External service integrations
│   │   ├── external_apis.py         # API managers (CoinGecko, etc.)
│   │   └── abi_registry.py          # Smart contract interfaces
│   ├── utils/               # Utilities and helpers
│   │   ├── gas_optimizer.py        # Gas price optimization
│   │   ├── profit_calculator.py    # P&L calculation
│   │   └── notification_service.py  # Alert system
│   ├── config/              # Configuration management
│   └── persistence/         # Data storage layer
```

##  Prerequisites

- **Synced Geth/Nethermind Node**: For blockchain RPC access
- **Python 3.11+**
- **Node.js 16+** (for some utilities)
- **Git**
- **Virtual Environment** (recommended)

### Required API Keys
- **CoinGecko/CoinMarketCap**: For price data (free API tier available)
- **CryptoCompare/Binance**: For additional market data (free API tier available)
- **Etherscan**: For contract and ABI verification (optional)

##  Installation

### 1. Clone the Repository
```bash
git clone https://github.com/yourusername/ON1Builder.git
cd ON1Builder
```

### 2. Create Virtual Environment
```bash
python -m venv .venv
source .venv/bin/activate  
# On Windows: .venv\Scripts\activate
```

### 3. Install Dependencies
```bash
pip install -r requirements.txt
```

### 4. Configuration Setup
```bash
# Copy example configuration
cp .env.example .env

# Edit configuration file
nano .env # Or use your favorite text editor
```

## Configuration

### Environment Variables

Create a `.env` file in the project root with the following configuration:

```bash
# Wallet Configuration
WALLET_KEY=0xYourPrivateKeyHere
WALLET_ADDRESS=0xYourWalletAddressHere
PROFIT_RECEIVER_ADDRESS=0xOptionalSeparateProfitAddress

# Blockchain Configuration
CHAINS=1,137,42161  # Ethereum, Polygon, Arbitrum
POA_CHAINS=137      # Proof of Authority chains

# RPC Endpoints (replace with your node endpoint(s)
RPC_URL_1=127.0.0.1:8545
RPC_URL_137=127.0.0.1:8546
RPC_URL_42161=127.0.0.1:8547

# WebSocket Endpoints (optional, for real-time data)
WEBSOCKET_URL_1=wss://127.0.0.1:8545

# Strategy Configuration (Adjust as needed)
MIN_PROFIT_ETH=0.005
MIN_PROFIT_PERCENTAGE=0.1
SLIPPAGE_TOLERANCE=0.5
MAX_GAS_PRICE_GWEI=200

# Flash Loan Settings (AAVE V3, optional)
FLASHLOAN_ENABLED=true
FLASHLOAN_MAX_AMOUNT_ETH=1000.0
FLASHLOAN_BUFFER_PERCENTAGE=0.1

# Risk Management
MAX_POSITION_SIZE_PERCENT=20.0
DAILY_LOSS_LIMIT_PERCENT=5.0
EMERGENCY_BALANCE_THRESHOLD=0.01

# API Keys (optional)
ETHERSCAN_API_KEY=your_etherscan_api_key
COINGECKO_API_KEY=your_coingecko_api_key
COINMARKETCAP_API_KEY=your_coinmarketcap_api_key
CRYPTOCOMPARE_API_KEY=your_cryptocompare_api_key
BINANCE_API_KEY=your_binance_api_key # Optional for additional market data
INFURA_PROJECT_ID=your_infura_project_id

# Notifications (optional)
NOTIFICATION_CHANNELS=slack,telegram
SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
TELEGRAM_CHAT_ID=your_telegram_chat_id

# Database
DATABASE_URL=sqlite+aiosqlite:///on1builder_data.db
```

### Contract Addresses

Configure DEX router addresses in your `.env`:

```bash
# Uniswap V2 Router addresses per chain
UNISWAP_V2_ROUTER_ADDRESSES={"1":"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D","137":"0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff"}

# Sushiswap Router addresses
SUSHISWAP_ROUTER_ADDRESSES={"1":"0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F","137":"0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"}

# Aave V3 Pool addresses for flash loans
AAVE_V3_POOL_ADDRESSES={"1":"0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2","137":"0x794a61358D6845594F94dc1DB02A252b5b4814aD"}
```

##  Usage

### Basic Usage

```bash
# Start the MEV bot
python -m on1builder

# Or using the main module
python src/on1builder/__main__.py
```

### Advanced Usage

```bash
# Run with debug logging
DEBUG=true python -m on1builder

# Run specific strategies only
MEV_STRATEGIES_ENABLED=true FRONT_RUNNING_ENABLED=false python -m on1builder

# Run in dry-run mode (no actual transactions)
DRY_RUN=true python -m on1builder
```

### CLI Commands

```bash
# Check configuration
python -m on1builder config check

# Monitor current status
python -m on1builder status

# View recent performance
python -m on1builder status --detailed
```

##  Monitoring & Analytics

### Real-Time Monitoring
- **Dashboard**: Web-based monitoring interface (optional)
- **Logs**: Structured JSON logs for external analysis
- **Metrics**: Prometheus-compatible metrics endpoint

### Key Metrics Tracked
- **Profit/Loss**: Real-time P&L calculation in ETH and USD
- **Success Rate**: Strategy success rates and execution times
- **Gas Efficiency**: Gas costs vs. profit ratios
- **Market Opportunities**: Detected vs. executed opportunities

### Notification Alerts
- **Trade Execution**: Successful arbitrage and MEV captures
- **Risk Events**: High slippage, failed transactions, low balances
- **System Health**: Connection issues, configuration errors

##  Safety Features

### Built-in Protections
- **Slippage Protection**: Configurable maximum slippage tolerance
- **Gas Limit Controls**: Maximum gas price and limit enforcement
- **Balance Monitoring**: Automatic low balance detection and alerts
- **Emergency Stops**: Immediate halt mechanisms for unusual conditions

### Risk Management
- **Position Sizing**: Automatic position sizing based on portfolio balance
- **Daily Loss Limits**: Automatic trading halt after significant losses
- **Transaction Validation**: Multi-layer validation before execution
- **Market Condition Checks**: Halt trading during extreme volatility

##  Development

### Running Tests
```bash
# Run all tests
python -m pytest tests/

# Run with coverage
python -m pytest tests/ --cov=on1builder

# Run specific test categories
python -m pytest tests/test_core/ -v
```

### Code Quality
```bash
# Format code
black src/ tests/

# Type checking
mypy src/

# Linting
flake8 src/ tests/
```

### Development Setup
```bash
# Install development dependencies
pip install -r requirements-dev.txt

# Install pre-commit hooks
pre-commit install

# Run pre-commit checks
pre-commit run --all-files
```

##  Performance Optimization

### Gas Optimization
- **Dynamic Gas Pricing**: Real-time gas price optimization
- **EIP-1559 Support**: Priority fee calculation for faster inclusion
- **Gas Limit Estimation**: Accurate gas estimation for complex transactions

### Execution Speed
- **Async Architecture**: Non-blocking operations for maximum throughput
- **Connection Pooling**: Persistent RPC connections for reduced latency
- **Parallel Processing**: Concurrent opportunity scanning across chains

### Capital Efficiency
- **Flash Loan Integration**: Zero-capital arbitrage opportunities
- **Just-In-Time Execution**: Minimal capital lock-up periods
- **Dynamic Rebalancing**: Automatic capital allocation across chains

##  Contributing

We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

### Development Workflow
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Add tests for new functionality
5. Ensure all tests pass (`python -m pytest`)
6. Commit your changes (`git commit -m 'Add amazing feature'`)
7. Push to the branch (`git push origin feature/amazing-feature`)
8. Open a Pull Request

### Code Standards
- Follow PEP 8 style guidelines
- Add type hints for all functions
- Include docstrings for public methods
- Maintain test coverage above 80%

## Disclaimer

**Important Legal and Financial Disclaimers:**

- **High Risk**: MEV bot trading involves substantial financial risk. You may lose some or all of your capital.
- **No Financial Advice**: This software is provided for educational and research purposes only. It does not constitute financial advice.
- **Regulatory Compliance**: Ensure compliance with local laws and regulations in your jurisdiction.
- **Use at Your Own Risk**: The developers are not responsible for any financial losses incurred through the use of this software.
- **Testnet First**: Always test thoroughly on testnets before deploying to mainnet.

##  License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Support

### Documentation
- **Wiki**: Comprehensive guides and tutorials
- **API Reference**: Detailed API documentation
- **Examples**: Sample configurations and use cases

### Community
- **Discord**: [Join our Discord server](https://discord.gg/yourdiscord)
- **Telegram**: [Official Telegram group](https://t.me/yourgroup)
- **GitHub Issues**: Bug reports and feature requests

### Professional Support
For enterprise deployments and custom development:
- **Email**: support@on1builder.com
- **Consulting**: Available for custom strategy development

## Acknowledgments

- **Web3.py**: For blockchain interaction capabilities
- **Aave Protocol**: For flash loan infrastructure
- **Uniswap**: For decentralized exchange protocols
- **OpenZeppelin**: For smart contract security standards
- **The Ethereum Community**: For continuous innovation in DeFi

## Disclaimer
![Warning](https://img.shields.io/badge/⚠️-red.svg)

**IN NO EVENT SHALL THE
AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.**

*You should always do your own research and understand the risks involved in trading and using MEV bots. This software is provided "as is" without any warranties or guarantees of any kind.*

---

**Built with ❤️ by the ON1Builder team**


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "on1builder",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "blockchain, ethereum, trading, mev, arbitrage, defi, flashloan, crypto, bot, automated-trading, web3, uniswap, multi-chain, async, framework",
    "author": null,
    "author_email": "john0n1 <john@on1.no>",
    "download_url": "https://files.pythonhosted.org/packages/db/a4/4e19a5e4e762ef789607cf46e7a117a6eca24de004f0d067e5eb57e120e4/on1builder-2.2.1.tar.gz",
    "platform": null,
    "description": "# ON1Builder MEV Bot\r\n\r\n[![Python 3.11+](https://img.shields.io/badge/Python-3.11+-blue.svg?logo=python&logoColor=white)](https://www.python.org/downloads/)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?logo=github)](https://opensource.org/licenses/MIT)\r\n[![PyPI Version](https://img.shields.io/pypi/v/on1builder?logo=pypi&logoColor=white)](https://pypi.org/project/on1builder/)\r\n\r\n[![Warning](https://img.shields.io/badge/\u26a0\ufe0f-Development%20Build-red.svg)](https://github.com/john0n1/ON1Builder)\r\n\r\n\r\n\r\nA sophisticated, Maximum Extractable Value (MEV) bot designed for multi-chain arbitrage, front-running, advanced DeFi strategies - utilizing Flashloans via Aave V3. Built with enterprise-grade architecture, comprehensive safety mechanisms, and real-time market analysis.\r\n\r\n##  Features\r\n\r\n### Core Capabilities\r\n- **Multi-Chain Support**: Simultaneous operations across Ethereum, Polygon, Arbitrum, and other EVM-compatible chains\r\n- **Advanced MEV Strategies**: Arbitrage, front-running, back-running, and sandwich attacks (configurable)\r\n- **Flash Loan Integration**: Automated flash loans from Aave V3 for capital-efficient strategies\r\n- **Real-Time Market Analysis**: Live price feeds, liquidity monitoring, and market sentiment analysis\r\n- **Machine Learning Optimization**: Adaptive strategy weights based on historical performance\r\n\r\n### Safety & Risk Management\r\n- **Multi-Layer Safety Guards**: Transaction validation, slippage protection, and emergency stops\r\n- **Dynamic Risk Assessment**: Real-time portfolio risk calculation and position sizing\r\n- **Gas Optimization**: Intelligent gas pricing with EIP-1559 support and cost minimization\r\n- **Balance Management**: Automated balance monitoring with emergency thresholds\r\n\r\n### Monitoring & Analytics\r\n- **Comprehensive Logging**: Structured logging with configurable verbosity levels\r\n- **Performance Metrics**: Real-time profit tracking, success rates, and ROI analysis\r\n- **Multi-Channel Notifications**: Slack, Telegram, Discord, and email alerts\r\n- **Database Integration**: SQLite/PostgreSQL support for transaction and profit history\r\n\r\n##  Architecture\r\n\r\n```\r\n\u251c\u2500\u2500 src/on1builder/\r\n\u2502   \u251c\u2500\u2500 core/                 # Core orchestration and chain management\r\n\u2502   \u2502   \u251c\u2500\u2500 main_orchestrator.py      # Main application controller\r\n\u2502   \u2502   \u251c\u2500\u2500 multi_chain_orchestrator.py # Cross-chain coordination\r\n\u2502   \u2502   \u251c\u2500\u2500 chain_worker.py           # Per-chain operation handler\r\n\u2502   \u2502   \u251c\u2500\u2500 transaction_manager.py    # Transaction execution\r\n\u2502   \u2502   \u2514\u2500\u2500 balance_manager.py        # Portfolio management\r\n\u2502   \u251c\u2500\u2500 engines/              # Strategy execution engines\r\n\u2502   \u2502   \u251c\u2500\u2500 strategy_executor.py      # MEV strategy implementation\r\n\u2502   \u2502   \u2514\u2500\u2500 safety_guard.py          # Risk management\r\n\u2502   \u251c\u2500\u2500 monitoring/           # Market data and transaction monitoring\r\n\u2502   \u2502   \u251c\u2500\u2500 market_data_feed.py      # Price feeds and market analysis\r\n\u2502   \u2502   \u2514\u2500\u2500 txpool_scanner.py        # Mempool monitoring\r\n\u2502   \u251c\u2500\u2500 integrations/         # External service integrations\r\n\u2502   \u2502   \u251c\u2500\u2500 external_apis.py         # API managers (CoinGecko, etc.)\r\n\u2502   \u2502   \u2514\u2500\u2500 abi_registry.py          # Smart contract interfaces\r\n\u2502   \u251c\u2500\u2500 utils/               # Utilities and helpers\r\n\u2502   \u2502   \u251c\u2500\u2500 gas_optimizer.py        # Gas price optimization\r\n\u2502   \u2502   \u251c\u2500\u2500 profit_calculator.py    # P&L calculation\r\n\u2502   \u2502   \u2514\u2500\u2500 notification_service.py  # Alert system\r\n\u2502   \u251c\u2500\u2500 config/              # Configuration management\r\n\u2502   \u2514\u2500\u2500 persistence/         # Data storage layer\r\n```\r\n\r\n##  Prerequisites\r\n\r\n- **Synced Geth/Nethermind Node**: For blockchain RPC access\r\n- **Python 3.11+**\r\n- **Node.js 16+** (for some utilities)\r\n- **Git**\r\n- **Virtual Environment** (recommended)\r\n\r\n### Required API Keys\r\n- **CoinGecko/CoinMarketCap**: For price data (free API tier available)\r\n- **CryptoCompare/Binance**: For additional market data (free API tier available)\r\n- **Etherscan**: For contract and ABI verification (optional)\r\n\r\n##  Installation\r\n\r\n### 1. Clone the Repository\r\n```bash\r\ngit clone https://github.com/yourusername/ON1Builder.git\r\ncd ON1Builder\r\n```\r\n\r\n### 2. Create Virtual Environment\r\n```bash\r\npython -m venv .venv\r\nsource .venv/bin/activate  \r\n# On Windows: .venv\\Scripts\\activate\r\n```\r\n\r\n### 3. Install Dependencies\r\n```bash\r\npip install -r requirements.txt\r\n```\r\n\r\n### 4. Configuration Setup\r\n```bash\r\n# Copy example configuration\r\ncp .env.example .env\r\n\r\n# Edit configuration file\r\nnano .env # Or use your favorite text editor\r\n```\r\n\r\n## Configuration\r\n\r\n### Environment Variables\r\n\r\nCreate a `.env` file in the project root with the following configuration:\r\n\r\n```bash\r\n# Wallet Configuration\r\nWALLET_KEY=0xYourPrivateKeyHere\r\nWALLET_ADDRESS=0xYourWalletAddressHere\r\nPROFIT_RECEIVER_ADDRESS=0xOptionalSeparateProfitAddress\r\n\r\n# Blockchain Configuration\r\nCHAINS=1,137,42161  # Ethereum, Polygon, Arbitrum\r\nPOA_CHAINS=137      # Proof of Authority chains\r\n\r\n# RPC Endpoints (replace with your node endpoint(s)\r\nRPC_URL_1=127.0.0.1:8545\r\nRPC_URL_137=127.0.0.1:8546\r\nRPC_URL_42161=127.0.0.1:8547\r\n\r\n# WebSocket Endpoints (optional, for real-time data)\r\nWEBSOCKET_URL_1=wss://127.0.0.1:8545\r\n\r\n# Strategy Configuration (Adjust as needed)\r\nMIN_PROFIT_ETH=0.005\r\nMIN_PROFIT_PERCENTAGE=0.1\r\nSLIPPAGE_TOLERANCE=0.5\r\nMAX_GAS_PRICE_GWEI=200\r\n\r\n# Flash Loan Settings (AAVE V3, optional)\r\nFLASHLOAN_ENABLED=true\r\nFLASHLOAN_MAX_AMOUNT_ETH=1000.0\r\nFLASHLOAN_BUFFER_PERCENTAGE=0.1\r\n\r\n# Risk Management\r\nMAX_POSITION_SIZE_PERCENT=20.0\r\nDAILY_LOSS_LIMIT_PERCENT=5.0\r\nEMERGENCY_BALANCE_THRESHOLD=0.01\r\n\r\n# API Keys (optional)\r\nETHERSCAN_API_KEY=your_etherscan_api_key\r\nCOINGECKO_API_KEY=your_coingecko_api_key\r\nCOINMARKETCAP_API_KEY=your_coinmarketcap_api_key\r\nCRYPTOCOMPARE_API_KEY=your_cryptocompare_api_key\r\nBINANCE_API_KEY=your_binance_api_key # Optional for additional market data\r\nINFURA_PROJECT_ID=your_infura_project_id\r\n\r\n# Notifications (optional)\r\nNOTIFICATION_CHANNELS=slack,telegram\r\nSLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK\r\nTELEGRAM_BOT_TOKEN=your_telegram_bot_token\r\nTELEGRAM_CHAT_ID=your_telegram_chat_id\r\n\r\n# Database\r\nDATABASE_URL=sqlite+aiosqlite:///on1builder_data.db\r\n```\r\n\r\n### Contract Addresses\r\n\r\nConfigure DEX router addresses in your `.env`:\r\n\r\n```bash\r\n# Uniswap V2 Router addresses per chain\r\nUNISWAP_V2_ROUTER_ADDRESSES={\"1\":\"0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D\",\"137\":\"0xa5E0829CaCEd8fFDD4De3c43696c57F7D7A678ff\"}\r\n\r\n# Sushiswap Router addresses\r\nSUSHISWAP_ROUTER_ADDRESSES={\"1\":\"0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F\",\"137\":\"0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506\"}\r\n\r\n# Aave V3 Pool addresses for flash loans\r\nAAVE_V3_POOL_ADDRESSES={\"1\":\"0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2\",\"137\":\"0x794a61358D6845594F94dc1DB02A252b5b4814aD\"}\r\n```\r\n\r\n##  Usage\r\n\r\n### Basic Usage\r\n\r\n```bash\r\n# Start the MEV bot\r\npython -m on1builder\r\n\r\n# Or using the main module\r\npython src/on1builder/__main__.py\r\n```\r\n\r\n### Advanced Usage\r\n\r\n```bash\r\n# Run with debug logging\r\nDEBUG=true python -m on1builder\r\n\r\n# Run specific strategies only\r\nMEV_STRATEGIES_ENABLED=true FRONT_RUNNING_ENABLED=false python -m on1builder\r\n\r\n# Run in dry-run mode (no actual transactions)\r\nDRY_RUN=true python -m on1builder\r\n```\r\n\r\n### CLI Commands\r\n\r\n```bash\r\n# Check configuration\r\npython -m on1builder config check\r\n\r\n# Monitor current status\r\npython -m on1builder status\r\n\r\n# View recent performance\r\npython -m on1builder status --detailed\r\n```\r\n\r\n##  Monitoring & Analytics\r\n\r\n### Real-Time Monitoring\r\n- **Dashboard**: Web-based monitoring interface (optional)\r\n- **Logs**: Structured JSON logs for external analysis\r\n- **Metrics**: Prometheus-compatible metrics endpoint\r\n\r\n### Key Metrics Tracked\r\n- **Profit/Loss**: Real-time P&L calculation in ETH and USD\r\n- **Success Rate**: Strategy success rates and execution times\r\n- **Gas Efficiency**: Gas costs vs. profit ratios\r\n- **Market Opportunities**: Detected vs. executed opportunities\r\n\r\n### Notification Alerts\r\n- **Trade Execution**: Successful arbitrage and MEV captures\r\n- **Risk Events**: High slippage, failed transactions, low balances\r\n- **System Health**: Connection issues, configuration errors\r\n\r\n##  Safety Features\r\n\r\n### Built-in Protections\r\n- **Slippage Protection**: Configurable maximum slippage tolerance\r\n- **Gas Limit Controls**: Maximum gas price and limit enforcement\r\n- **Balance Monitoring**: Automatic low balance detection and alerts\r\n- **Emergency Stops**: Immediate halt mechanisms for unusual conditions\r\n\r\n### Risk Management\r\n- **Position Sizing**: Automatic position sizing based on portfolio balance\r\n- **Daily Loss Limits**: Automatic trading halt after significant losses\r\n- **Transaction Validation**: Multi-layer validation before execution\r\n- **Market Condition Checks**: Halt trading during extreme volatility\r\n\r\n##  Development\r\n\r\n### Running Tests\r\n```bash\r\n# Run all tests\r\npython -m pytest tests/\r\n\r\n# Run with coverage\r\npython -m pytest tests/ --cov=on1builder\r\n\r\n# Run specific test categories\r\npython -m pytest tests/test_core/ -v\r\n```\r\n\r\n### Code Quality\r\n```bash\r\n# Format code\r\nblack src/ tests/\r\n\r\n# Type checking\r\nmypy src/\r\n\r\n# Linting\r\nflake8 src/ tests/\r\n```\r\n\r\n### Development Setup\r\n```bash\r\n# Install development dependencies\r\npip install -r requirements-dev.txt\r\n\r\n# Install pre-commit hooks\r\npre-commit install\r\n\r\n# Run pre-commit checks\r\npre-commit run --all-files\r\n```\r\n\r\n##  Performance Optimization\r\n\r\n### Gas Optimization\r\n- **Dynamic Gas Pricing**: Real-time gas price optimization\r\n- **EIP-1559 Support**: Priority fee calculation for faster inclusion\r\n- **Gas Limit Estimation**: Accurate gas estimation for complex transactions\r\n\r\n### Execution Speed\r\n- **Async Architecture**: Non-blocking operations for maximum throughput\r\n- **Connection Pooling**: Persistent RPC connections for reduced latency\r\n- **Parallel Processing**: Concurrent opportunity scanning across chains\r\n\r\n### Capital Efficiency\r\n- **Flash Loan Integration**: Zero-capital arbitrage opportunities\r\n- **Just-In-Time Execution**: Minimal capital lock-up periods\r\n- **Dynamic Rebalancing**: Automatic capital allocation across chains\r\n\r\n##  Contributing\r\n\r\nWe welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\r\n\r\n### Development Workflow\r\n1. Fork the repository\r\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\r\n3. Make your changes\r\n4. Add tests for new functionality\r\n5. Ensure all tests pass (`python -m pytest`)\r\n6. Commit your changes (`git commit -m 'Add amazing feature'`)\r\n7. Push to the branch (`git push origin feature/amazing-feature`)\r\n8. Open a Pull Request\r\n\r\n### Code Standards\r\n- Follow PEP 8 style guidelines\r\n- Add type hints for all functions\r\n- Include docstrings for public methods\r\n- Maintain test coverage above 80%\r\n\r\n## Disclaimer\r\n\r\n**Important Legal and Financial Disclaimers:**\r\n\r\n- **High Risk**: MEV bot trading involves substantial financial risk. You may lose some or all of your capital.\r\n- **No Financial Advice**: This software is provided for educational and research purposes only. It does not constitute financial advice.\r\n- **Regulatory Compliance**: Ensure compliance with local laws and regulations in your jurisdiction.\r\n- **Use at Your Own Risk**: The developers are not responsible for any financial losses incurred through the use of this software.\r\n- **Testnet First**: Always test thoroughly on testnets before deploying to mainnet.\r\n\r\n##  License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Support\r\n\r\n### Documentation\r\n- **Wiki**: Comprehensive guides and tutorials\r\n- **API Reference**: Detailed API documentation\r\n- **Examples**: Sample configurations and use cases\r\n\r\n### Community\r\n- **Discord**: [Join our Discord server](https://discord.gg/yourdiscord)\r\n- **Telegram**: [Official Telegram group](https://t.me/yourgroup)\r\n- **GitHub Issues**: Bug reports and feature requests\r\n\r\n### Professional Support\r\nFor enterprise deployments and custom development:\r\n- **Email**: support@on1builder.com\r\n- **Consulting**: Available for custom strategy development\r\n\r\n## Acknowledgments\r\n\r\n- **Web3.py**: For blockchain interaction capabilities\r\n- **Aave Protocol**: For flash loan infrastructure\r\n- **Uniswap**: For decentralized exchange protocols\r\n- **OpenZeppelin**: For smart contract security standards\r\n- **The Ethereum Community**: For continuous innovation in DeFi\r\n\r\n## Disclaimer\r\n![Warning](https://img.shields.io/badge/\u26a0\ufe0f-red.svg)\r\n\r\n**IN NO EVENT SHALL THE\r\nAUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.**\r\n\r\n*You should always do your own research and understand the risks involved in trading and using MEV bots. This software is provided \"as is\" without any warranties or guarantees of any kind.*\r\n\r\n---\r\n\r\n**Built with \u2764\ufe0f by the ON1Builder team**\r\n\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A high-performance, multi-chain MEV and trading bot framework.",
    "version": "2.2.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/john0n1/ON1Builder/issues",
        "Homepage": "https://github.com/john0n1/ON1Builder"
    },
    "split_keywords": [
        "blockchain",
        " ethereum",
        " trading",
        " mev",
        " arbitrage",
        " defi",
        " flashloan",
        " crypto",
        " bot",
        " automated-trading",
        " web3",
        " uniswap",
        " multi-chain",
        " async",
        " framework"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2daa03af90efc3214cbba3ab263207f86f6a985b380d87c7e6e85969cadb900d",
                "md5": "5f642c16907b54b4176d9bcb4c19b246",
                "sha256": "67cf0f888bccaf0b059043f053a2188f147a82d0ab4f4d89cc1881b0dc82cb87"
            },
            "downloads": -1,
            "filename": "on1builder-2.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5f642c16907b54b4176d9bcb4c19b246",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 183184,
            "upload_time": "2025-07-13T22:54:21",
            "upload_time_iso_8601": "2025-07-13T22:54:21.261785Z",
            "url": "https://files.pythonhosted.org/packages/2d/aa/03af90efc3214cbba3ab263207f86f6a985b380d87c7e6e85969cadb900d/on1builder-2.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "dba44e19a5e4e762ef789607cf46e7a117a6eca24de004f0d067e5eb57e120e4",
                "md5": "d3cd84cfeaef038109336f6aa9d2a0aa",
                "sha256": "011feef9cf298f6c938dce31be7a48581434f451c670adfc12b6017caf3a9de7"
            },
            "downloads": -1,
            "filename": "on1builder-2.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "d3cd84cfeaef038109336f6aa9d2a0aa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 175424,
            "upload_time": "2025-07-13T22:54:22",
            "upload_time_iso_8601": "2025-07-13T22:54:22.557716Z",
            "url": "https://files.pythonhosted.org/packages/db/a4/4e19a5e4e762ef789607cf46e7a117a6eca24de004f0d067e5eb57e120e4/on1builder-2.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-13 22:54:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "john0n1",
    "github_project": "ON1Builder",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "aiohappyeyeballs",
            "specs": [
                [
                    "==",
                    "2.6.1"
                ]
            ]
        },
        {
            "name": "aiohttp",
            "specs": [
                [
                    "==",
                    "3.12.13"
                ]
            ]
        },
        {
            "name": "aiosignal",
            "specs": [
                [
                    "==",
                    "1.4.0"
                ]
            ]
        },
        {
            "name": "aiosqlite",
            "specs": [
                [
                    ">=",
                    "0.19.0"
                ]
            ]
        },
        {
            "name": "annotated-types",
            "specs": [
                [
                    "==",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "attrs",
            "specs": [
                [
                    "==",
                    "25.3.0"
                ]
            ]
        },
        {
            "name": "Automat",
            "specs": [
                [
                    "==",
                    "25.4.16"
                ]
            ]
        },
        {
            "name": "bitarray",
            "specs": [
                [
                    "==",
                    "3.5.0"
                ]
            ]
        },
        {
            "name": "build",
            "specs": [
                [
                    "==",
                    "1.2.2.post1"
                ]
            ]
        },
        {
            "name": "buildtools",
            "specs": [
                [
                    "==",
                    "1.0.6"
                ]
            ]
        },
        {
            "name": "cachetools",
            "specs": [
                [
                    "==",
                    "6.1.0"
                ]
            ]
        },
        {
            "name": "certifi",
            "specs": [
                [
                    "==",
                    "2025.6.15"
                ]
            ]
        },
        {
            "name": "charset-normalizer",
            "specs": [
                [
                    "==",
                    "3.4.2"
                ]
            ]
        },
        {
            "name": "ckzg",
            "specs": [
                [
                    "==",
                    "2.1.1"
                ]
            ]
        },
        {
            "name": "colorlog",
            "specs": [
                [
                    "==",
                    "6.9.0"
                ]
            ]
        },
        {
            "name": "constantly",
            "specs": [
                [
                    "==",
                    "23.10.4"
                ]
            ]
        },
        {
            "name": "cytoolz",
            "specs": [
                [
                    "==",
                    "1.0.1"
                ]
            ]
        },
        {
            "name": "docopt",
            "specs": [
                [
                    "==",
                    "0.6.2"
                ]
            ]
        },
        {
            "name": "eth-account",
            "specs": [
                [
                    "==",
                    "0.13.7"
                ]
            ]
        },
        {
            "name": "eth-hash",
            "specs": [
                [
                    "==",
                    "0.7.1"
                ]
            ]
        },
        {
            "name": "eth-keyfile",
            "specs": [
                [
                    "==",
                    "0.8.1"
                ]
            ]
        },
        {
            "name": "eth-keys",
            "specs": [
                [
                    "==",
                    "0.7.0"
                ]
            ]
        },
        {
            "name": "eth-rlp",
            "specs": [
                [
                    "==",
                    "2.2.0"
                ]
            ]
        },
        {
            "name": "eth-typing",
            "specs": [
                [
                    "==",
                    "5.2.1"
                ]
            ]
        },
        {
            "name": "eth-utils",
            "specs": [
                [
                    "==",
                    "5.3.0"
                ]
            ]
        },
        {
            "name": "eth_abi",
            "specs": [
                [
                    "==",
                    "5.2.0"
                ]
            ]
        },
        {
            "name": "frozenlist",
            "specs": [
                [
                    "==",
                    "1.7.0"
                ]
            ]
        },
        {
            "name": "furl",
            "specs": [
                [
                    "==",
                    "2.1.4"
                ]
            ]
        },
        {
            "name": "greenlet",
            "specs": [
                [
                    "==",
                    "3.2.3"
                ]
            ]
        },
        {
            "name": "hexbytes",
            "specs": [
                [
                    "==",
                    "1.3.1"
                ]
            ]
        },
        {
            "name": "hyperlink",
            "specs": [
                [
                    "==",
                    "21.0.0"
                ]
            ]
        },
        {
            "name": "idna",
            "specs": [
                [
                    "==",
                    "3.10"
                ]
            ]
        },
        {
            "name": "incremental",
            "specs": [
                [
                    "==",
                    "24.7.2"
                ]
            ]
        },
        {
            "name": "Jinja2",
            "specs": [
                [
                    "==",
                    "3.1.6"
                ]
            ]
        },
        {
            "name": "MarkupSafe",
            "specs": [
                [
                    "==",
                    "3.0.2"
                ]
            ]
        },
        {
            "name": "multidict",
            "specs": [
                [
                    "==",
                    "6.6.3"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "2.3.0"
                ]
            ]
        },
        {
            "name": "orderedmultidict",
            "specs": [
                [
                    "==",
                    "1.0.1"
                ]
            ]
        },
        {
            "name": "packaging",
            "specs": [
                [
                    "==",
                    "25.0"
                ]
            ]
        },
        {
            "name": "parsimonious",
            "specs": [
                [
                    "==",
                    "0.10.0"
                ]
            ]
        },
        {
            "name": "pathlib",
            "specs": [
                [
                    "==",
                    "1.0.1"
                ]
            ]
        },
        {
            "name": "propcache",
            "specs": [
                [
                    "==",
                    "0.3.2"
                ]
            ]
        },
        {
            "name": "psutil",
            "specs": [
                [
                    ">=",
                    "7.0.0"
                ]
            ]
        },
        {
            "name": "pyaml",
            "specs": [
                [
                    "==",
                    "25.5.0"
                ]
            ]
        },
        {
            "name": "pycryptodome",
            "specs": [
                [
                    "==",
                    "3.23.0"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "==",
                    "2.11.7"
                ]
            ]
        },
        {
            "name": "pydantic_core",
            "specs": [
                [
                    "==",
                    "2.33.2"
                ]
            ]
        },
        {
            "name": "pydantic-settings",
            "specs": [
                [
                    ">=",
                    "2.1.0"
                ]
            ]
        },
        {
            "name": "pyproject_hooks",
            "specs": [
                [
                    "==",
                    "1.2.0"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.9.0.post0"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    ">=",
                    "0.9.0"
                ]
            ]
        },
        {
            "name": "pyunormalize",
            "specs": [
                [
                    "==",
                    "16.0.0"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "==",
                    "6.0.2"
                ]
            ]
        },
        {
            "name": "questionary",
            "specs": [
                [
                    ">=",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "redo",
            "specs": [
                [
                    "==",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "regex",
            "specs": [
                [
                    "==",
                    "2024.11.6"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.32.4"
                ]
            ]
        },
        {
            "name": "rich",
            "specs": [
                [
                    ">=",
                    "13.7.0"
                ]
            ]
        },
        {
            "name": "rlp",
            "specs": [
                [
                    "==",
                    "4.1.0"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": [
                [
                    "==",
                    "80.9.0"
                ]
            ]
        },
        {
            "name": "simplejson",
            "specs": [
                [
                    "==",
                    "3.20.1"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.17.0"
                ]
            ]
        },
        {
            "name": "SQLAlchemy",
            "specs": [
                [
                    "==",
                    "2.0.41"
                ]
            ]
        },
        {
            "name": "toolz",
            "specs": [
                [
                    "==",
                    "1.0.0"
                ]
            ]
        },
        {
            "name": "Twisted",
            "specs": [
                [
                    "==",
                    "25.5.0"
                ]
            ]
        },
        {
            "name": "types-requests",
            "specs": [
                [
                    "==",
                    "2.32.4.20250611"
                ]
            ]
        },
        {
            "name": "typing",
            "specs": [
                [
                    "==",
                    "3.7.4.3"
                ]
            ]
        },
        {
            "name": "typing-inspection",
            "specs": [
                [
                    "==",
                    "0.4.1"
                ]
            ]
        },
        {
            "name": "typing_extensions",
            "specs": [
                [
                    "==",
                    "4.14.1"
                ]
            ]
        },
        {
            "name": "typer",
            "specs": [
                [
                    ">=",
                    "0.9.0"
                ]
            ]
        },
        {
            "name": "urllib3",
            "specs": [
                [
                    "==",
                    "2.5.0"
                ]
            ]
        },
        {
            "name": "web3",
            "specs": [
                [
                    "==",
                    "7.12.0"
                ]
            ]
        },
        {
            "name": "websockets",
            "specs": [
                [
                    "==",
                    "15.0.1"
                ]
            ]
        },
        {
            "name": "yarl",
            "specs": [
                [
                    "==",
                    "1.20.1"
                ]
            ]
        },
        {
            "name": "zope.interface",
            "specs": [
                [
                    "==",
                    "7.2"
                ]
            ]
        }
    ],
    "lcname": "on1builder"
}
        
Elapsed time: 0.70679s