smartsave
smartsave - an app for auto-saving bitcoin on Base powered by AI agents.
Problem Statement
Smartsave is an app designed to transform the way you save Bitcoin by automating your investment strategy with the power of AI on the Base network. Imagine an intelligent system that not only helps you set aside Bitcoin effortlessly but also optimizes your savings based on real-time market trends and personalized financial goals.At its core, smartsave tackles the common challenge of inconsistent saving habits by leveraging advanced AI agents. These smart agents continuously analyze market data and user behavior to determine the best moments to auto-save, ensuring every buy is strategically timed. With an intuitive, user-friendly interface, smartsave makes it simple for everyone—from crypto newcomers to seasoned investors—to build a robust Bitcoin reserve without the need for constant manual intervention. Of course, this app could work for any asset.Security and efficiency are at the heart of our solution. By integrating directly with AgentKit by Coinbase and the Base blockchain, smartsave guarantees transparency and safety for every transaction, while our AI-driven approach adapts to market fluctuations, providing a dynamic and risk-aware saving experience.
Solution
smartsave has three main components: the app, api and agents.The app is build with Swift and SwiftUI. It uses the API (implemented in Next.js/Typescript and hosted on vercel) to communicate with the agents. The agents are based on Coinbase's AgentKit.The app calls in total four endpoints on the vercel API (implemented with Next.js)./accoount: to init/create/deploy the agents (will auto-create wallet with agentkit for user)/balance: to retrieve the cbBTC balance for the given account/dca: to configure the DCA settings for the agents/transactions: to fetch transactions for given account of the user (used in the app to display the bars graph and transactions list)The agents project uses Fastify to expose an API that can be called from the API hosted on vercel.Core Features:Automated Bitcoin buying on Base network using cbBTC with ETHPrice monitoring using CoinGecko APIGas fee analysis using BlockNative APIDCA (Dollar Cost Averaging) implementationMain Components:runAgents.ts: Main code that coordinates buying decisionscoingecko.ts: Price fetching and analysis from CoinGeckoblockchative.ts: Gas fee analysis from BlockNativeconstant.ts: Configuration constants like contract addressesKey Workflows:Fetches current BTC/ETH pricesAnalyzes 7-day price averagesChecks gas fees on Base networkAgents makes buy/no-buy decisions based on:Price trendsGas fee conditionsDCA target amountsTwo Agents are usedOracle Agent: Acts as decision maker:Processes price and gas data-Returns yes/no decision for buying Evaluates market conditions through natural languageWallet AgentHandles transaction executionManages DCA trackingPerforms ETH to cbBTC swapsInteracts directly with Base network The system works sequentially:Oracle Agent decides if market conditions are favorable If yes, Wallet Agent checks DCA amount and executes trade If no, cycle waits for next intervalAPIs Used:CoinGecko API for crypto pricesBlockNative API for gas feesBase network for transactions
Hackathon
Agentic Ethereum
2025
Prizes
- 🏆
AgentKit Pool Prize
Coinbase Developer Platform
Contributors
- janndriessen
59 contributions
- markus0x1
31 contributions