Oscar MkII: AI-Powered Financial Assistant with BlockDAG
An intelligent financial management system that combines AI-powered insights with blockchain technology, featuring real-time transaction processing using BlockDAG and voice-enabled financial assistance.
🌟 Key Features
Core Functionality
- Real-time monitoring of multi-chain wallet balances
- AI-powered financial analysis and recommendations
- Voice interaction using natural language processing
- Automated investment and savings strategies
BlockDAG Integration
- High-throughput transaction processing with BlockDAG
- Parallel transaction validation for faster confirmations
- Enhanced security through DAG structure
- Real-time balance and transaction tracking
Smart Automation
- Automated savings and investment plans
- Spending pattern analysis and optimization
- Tax-loss harvesting strategies
- Multi-chain asset management
🛠️ Prerequisites
- Python 3.8+
- API Keys for:
- Gemini AI (
GEMINI_API_KEY) - Bland AI (
BLAND_AI_API_KEY) - Infura (
INFURA_API_KEY) - Binance (Optional, for market data)
- Alpha Vantage (Optional, for stock market data)
- Gemini AI (
Installation
Clone the repository:
git clone https://github.com/yourusername/ai-wallet-monitor.git cd ai-wallet-monitorCreate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtCreate a
.envfile with your API keys:GEMINI_API_KEY=your_gemini_api_key BLAND_AI_API_KEY=your_bland_ai_api_key INFURA_API_KEY=your_infura_api_key WALLET_ADDRESS=your_ethereum_wallet_address PRIVATE_KEY_PATH=path_to_your_encrypted_private_key BINANCE_API_KEY=your_binance_api_key BINANCE_API_SECRET=your_binance_api_secret CALLBACK_URL=your_webhook_url USER_PHONE_NUMBER=your_phone_number
🚀 Quick Start
Installation
Clone the repository:
git clone https://github.com/yourusername/oscar-mkii.git cd oscar-mkiiSet up the virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtConfigure your environment:
cp src/config.env.example src/config.env # Edit the config file with your API keys and settings
🏗️ BlockDAG Architecture
Oscar MkII leverages BlockDAG (Directed Acyclic Graph) technology to achieve high throughput and fast confirmations:
[Block 1]
/ | \
[Block 2] [Block 3] [Block 4]
\ / \ /
[Block 5] [Block 6]
\ /
[Block 7]
Key Components
Transaction Processor
- Manages transaction pool (mempool)
- Creates and validates blocks
- Maintains DAG structure
- Handles block propagation
Consensus Mechanism
- Parallel block validation
- Weight-based finality
- Protection against double-spending
- Fork resolution
Wallet Integration
- Combines on-chain and BlockDAG transactions
- Real-time balance calculation
- Transaction history aggregation
- Multi-signature support
🤖 Usage Examples
Initialize the System
from src.wallet_monitor import WalletMonitor
# Initialize with your configuration
wallet = WalletMonitor(
wallet_address="YOUR_WALLET_ADDRESS",
private_key_path="path/to/your/private_key"
)
Make a Voice Call
python oscar_ai_call.py
Check BlockDAG Status
status = wallet.get_blockdag_status()
print(f"BlockDAG Status: {status}")
Add a Transaction to BlockDAG
tx = {
'from': '0x123...',
'to': '0x456...',
'amount': 1.5,
'token': 'ETH',
'timestamp': int(time.time())
}
tx_hash = wallet.add_transaction(tx)
print(f"Transaction added with hash: {tx_hash}")
📊 BlockDAG Transaction Flow
Transaction Submission
- User initiates a transaction
- Transaction is added to the mempool
- BlockDAG nodes validate the transaction
Block Creation
- Transactions are grouped into blocks
- Each block references multiple previous blocks
- Blocks are added to the DAG structure
Consensus
- Network reaches consensus on valid blocks
- Transactions achieve finality based on DAG depth
- Confirmed transactions update wallet balances
🔍 Features in Detail
AI-Powered Financial Assistant
- Natural language understanding
- Real-time market analysis
- Personalized financial advice
- Interactive Q&A
Multi-Chain Support
- Ethereum (Mainnet, Goerli)
- Binance Smart Chain
- Polygon
- Other EVM-compatible chains
Security Features
- End-to-end encryption
- Multi-signature transactions
- Fraud detection
- Regular security audits
📈 Performance
- 1000+ TPS (Transactions Per Second)
- Sub-second confirmation times
- 99.99% uptime
- Enterprise-grade security
📚 Documentation
For detailed documentation, please visit our Documentation Portal
🤝 Contributing
We welcome contributions! Please read our Contributing Guidelines to get started.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
📞 Support
For support, please open an issue or contact support@oscarmkii.ai
Usage
Start the application:
python src/main.pyThe system will:
- Monitor your wallet balances daily
- Identify unused funds based on spending patterns
- Generate investment suggestions when unused funds are detected
- Initiate voice calls to discuss investment opportunities
- Execute investments based on your voice commands
Project Structure
ai_wallet_monitor/
├── config/
│ └── config.py # Configuration and environment variables
├── src/
│ ├── main.py # Main application and Flask server
│ ├── wallet_monitor.py # Wallet balance monitoring
│ ├── investment_analyzer.py # Investment analysis
│ └── voice_interaction.py # Voice call handling
├── tests/ # Test files
├── data/ # Data storage
├── requirements.txt # Python dependencies
└── README.md # This file
Configuration
You can adjust various parameters in config/config.py:
UNUSED_BALANCE_THRESHOLD: Percentage above average spending to consider funds as unusedMIN_INVESTMENT_AMOUNT: Minimum amount to consider for investmentMAX_INVESTMENT_AMOUNT: Maximum amount for a single investmentETHEREUM_RPC_URL: Ethereum node RPC URLBITCOIN_RPC_URL: Bitcoin node RPC URL
Security
- Private keys are stored encrypted and never exposed
- API keys are managed through environment variables
- All transactions require voice confirmation
- Investment amounts are capped to prevent large unauthorized transactions
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Disclaimer
This software is provided for educational purposes only. Use at your own risk. The developers are not responsible for any financial losses incurred through the use of this software.
Log in or sign up for Devpost to join the conversation.