Search projects, hackathons, sponsors and tech

    ← All projects

    DCAgent

    DCAgent is an AI-powered autonomous agent that helps users stack Bitcoin through dollar-cost averaging (DCA) on Base using cbBTC.

    Demo

    About

    The problem it solves Bitcoin accumulation through Dollar-Cost Averaging (DCA) is proven effective but often executed inefficiently. Traditional DCA approaches suffer from: Emotional decision-making affecting purchase timing Inability to capitalize on market dips No yield generation on idle assets Inefficient gas usage and transaction execution Lack of intelligence to adapt to changing market conditions User Interaction and Data Flow # User Interaction and Data Flow for DCAgent DCAgent is an autonomous Bitcoin accumulation system that combines AI-driven analysis with blockchain operations to execute smart DCA strategies. Here's how users interact with it: ## Initial Setup - **Configuration**: Users set parameters (DCA amount, interval, dip thresholds, yield settings) - **Wallet Connection**: Connect via AgentKit with appropriate permissions - **Strategy Selection**: Choose which strategies to enable (Regular DCA, Dip Buying, Yield Optimization) ## Ongoing Interaction After setup, DCAgent operates autonomously while users can: - **Monitor Dashboard**: View execution history, BTC accumulated, AI insights, yield positions - **Adjust Settings**: Modify parameters or pause/resume strategies - **Request AI Analysis**: Get on-demand market analysis from Claude ## Data Flow The system integrates several components: - **DCAgent Core**: Central coordinator executing strategies - **Claude AI**: Analyzes market data and optimizes decisions - **Pyth Network**: Provides price feeds - **Base L2**: Executes blockchain transactions - **Aerodrome Finance**: Enables yield farming - **Event Logger**: Records all actions for transparency ## Behind the Scenes 1. **Strategy Execution**: The agent evaluates conditions, consults Claude AI, executes transactions 2. **AI Framework**: Claude analyzes market data, providing sentiment assessment and recommendations 3. **Transaction Flow**: Includes gas optimization, retry logic, and confirmation monitoring ## Sample Journey Alice sets up weekly $50 DCA into Bitcoin. The agent automatically executes regular purchases, buys additional BTC during dips, deploys idle funds to earn yield, and provides insights through the dashboard. DCAgent delivers sophisticated Bitcoin accumulation with minimal user intervention while maintaining complete transparency into all operations and decisions. The project architecture and development process # DCAgent Architecture and Development Process ## Solution Overview DCAgent is an autonomous Bitcoin accumulation system built on Base L2 that combines AI-powered market analysis with blockchain automation. It implements three core strategies (regular DCA, dip buying, and yield optimization) to efficiently stack BTC while maximizing returns. ## Architecture Components - **Core Agent**: Central orchestrator that evaluates strategy conditions and triggers executions - **Strategy Framework**: Modular system with three complementary strategies: - DCA Strategy (time-based purchases) - Dip Strategy (opportunity-based purchases) - Yield Strategy (liquidity deployment) - **AI Integration**: Claude AI provides market analysis, execution parameters, and strategy recommendations - **Blockchain Layer**: Handles transactions on Base L2 using AgentKit with retry mechanisms and gas optimization - **Price Oracles**: Pyth Network integration with Coinbase API backup - **Protocol Connectors**: Custom integration with Aerodrome Finance for liquidity provision and yield generation ## Development Process 1. **Research Phase**: - Analyzed existing DCA solutions and their limitations - Identified key integration points with Base L2 and AgentKit - Designed AI prompts for cryptocurrency market analysis 2. **Core Implementation**: - Built strategy framework with execution logic - Implemented transaction handling with retry mechanisms - Created event logging system for transparency 3. **Protocol Integration**: - Developed Aerodrome Finance connector for LP management - Implemented cbBTC/USDC pair interactions - Built yield harvesting and compounding functionality 4. **AI Enhancement**: - Engineered specialized Claude prompts for market analysis - Implemented feedback mechanisms for strategy optimization - Created AI-driven gas price prediction ## Technical Details - **Blockchain Interaction**: Web3.py with custom middleware for reliable tra Product Integrations # Product Integrations in DCAgent ## Base L2 Integration - **Role**: Primary blockchain layer for executing transactions - **Integration**: Using Web3.py with custom middleware for reliable interaction with Base RPC endpoints - **Benefits**: Low transaction costs and fast confirmations that make frequent DCA purchases economically viable ## AgentKit by Coinbase - **Role**: Framework for autonomous blockchain operations - **Integration**: Core agent architecture leverages AgentKit for action providers and wallet management - **Benefits**: Simplified wallet operations and standardized action interface for blockchain interactions ## Aerodrome Finance - **Role**: DEX and liquidity provider on Base L2 - **Integration**: Custom action provider and contract interactions for LP management - **Benefits**: Enables yield generation on idle assets through liquidity provision and gauge staking ## Claude AI (Anthropic) - **Role**: Market analysis and decision optimization - **Integration**: Specialized prompts for cryptocurrency market analysis using Anthropic API - **Benefits**: Provides intelligent market sentiment analysis and trade parameter optimization ## Pyth Network - **Role**: On-chain price oracle - **Integration**: Direct contract calls to Pyth price feeds on Base - **Benefits**: Reliable, manipulation-resistant cryptocurrency price data ## cbBTC (Coinbase Bitcoin) - **Role**: Primary investment asset - **Integration**: ERC-20 token interactions for trading and liquidity provision - **Benefits**: Trusted Bitcoin representation on Base L2 with deep liquidity ## Coinbase Price API - **Role**: Fallback price source - **Integration**: REST API calls with exponential backoff - **Benefits**: Additional price verification source when on-chain data is unavailable ## Supporting Integrations - **Web3.py**: Core library for blockchain interaction - **ERC-20/LP Token Standards**: For token interactions and liquidity provision - **Dotenv**: For configuration management - * Key differentiators and uniqueness of the project DCAgent revolutionizes Bitcoin accumulation by integrating AI-driven decision-making with autonomous DeFi execution, offering unique advantages over traditional tools. Key differentiators include: 1. **AI-Driven Decision Making:** Utilizes Claude AI for real-time market analysis, adapting purchases based on price action, sentiment, and technical indicators, unlike traditional DCA tools that operate on fixed schedules. 2. **Multi-Strategy Orchestration:** Combines regular DCA, dip buying, and yield optimization into a single autonomous system, whereas existing solutions typically focus on a single strategy. 3. **Base L2 Optimization:** Built for Base L2, leveraging low fees and fast finality for efficient, high-frequency transactions, unlike competitors on Ethereum mainnet where gas costs are prohibitive for small purchases. 4. **Yield Integration with Aerodrome:** Automatically deploys assets to Aerodrome Finance during accumulation periods, generating additional yield, unlike standard DCA services that leave assets idle. 5. **Intelligent Gas Optimization:** Uses AI to predict optimal gas prices and transaction timing, reducing costs compared to other DeFi tools with static gas strategies. DCAgent's technical innovations include custom Claude AI integration, AgentKit implementation for autonomous transactions, fault-tolerant architecture, and a modular strategy framework. It addresses user pain points like emotional decision-making, missed market opportunities, yield inefficiency, and complexity barriers. By combining these features, DCAgent represents a significant advancement in AI and DeFi integration, offering a next-generation Bitcoin accumulation system. Trade-offs and shortcuts while building DCAgent's development involved strategic trade-offs and shortcuts to deliver a functional prototype while maintaining its core vision. Key decisions include: 1. **Price Feed Implementation:** Simplified with Coinbase API and Pyth Network fallback, lacking extensive historical data. Future plans include redundant oracles and advanced data sources for trend analysis. 2. **Testing Environment:** Limited to Base Sepolia testnet with manual verification. Future improvements will focus on comprehensive automated testing and simulation environments for backtesting. 3. **Error Handling:** Basic retry logic and fallback actions were prioritized over exhaustive error mapping. Future enhancements will include detailed error taxonomy, circuit breakers, and granular notifications. Technical shortcuts include: - **Claude AI Integration:** Direct API calls with basic JSON parsing. Future plans involve prompt versioning, context management, and fallback to alternative models. - **Aerodrome Integration:** Simplified pool interactions and yield tracking. Future improvements will support multiple pools, impermanent loss management, and dynamic pool selection. - **Transaction Management:** Basic nonce and gas price handling. Future upgrades will include MEV-aware routing, advanced gas optimization, and batched transactions. Framework limitations include: - **Strategy Coordination:** Simple time-based scheduling with basic conflict prevention. Future versions will feature advanced orchestration and dynamic strategy allocation. - **Security Considerations:** Standard private key management and access controls. Future enhancements will include hardware wallet support, multi-signature flows, and anomaly detection. Planned architecture evolution focuses on a robust core with enhanced market analysis, AI model management, and advanced transaction engines, alongside security enhancements and comprehensive data infrastructure. Despite these trade-offs, DCAgent successfully demonstrates i Additional Features The entire project was built 100% during the hackathon.