Video thumbnail

smartsave

smartsave - an app for auto-saving bitcoin on Base powered by AI agents.

smartsave

Created At

Agentic Ethereum

Winner of

Coinbase Developer Platform - AgentKit Pool Prize

Prize Pool

Project Description

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.

How it's Made

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.

  1. Core Features:
  • Automated Bitcoin buying on Base network using cbBTC with ETH
  • Price monitoring using CoinGecko API
  • Gas fee analysis using BlockNative API
  • DCA (Dollar Cost Averaging) implementation
  1. Main Components:
  • runAgents.ts: Main code that coordinates buying decisions
  • coingecko.ts: Price fetching and analysis from CoinGecko
  • blockchative.ts: Gas fee analysis from BlockNative
  • constant.ts: Configuration constants like contract addresses
  1. Key Workflows:
  • Fetches current BTC/ETH prices
  • Analyzes 7-day price averages
  • Checks gas fees on Base network
  • Agents makes buy/no-buy decisions based on:
    • Price trends
    • Gas fee conditions
    • DCA target amounts
  1. Two Agents are used

Oracle Agent: Acts as decision maker:

  • Processes price and gas data-
  • Returns yes/no decision for buying Evaluates market conditions through natural language

Wallet Agent

  • Handles transaction execution
  • Manages DCA tracking
  • Performs ETH to cbBTC swaps

Interacts 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 interval

  1. APIs Used:
  • CoinGecko API for crypto prices
  • BlockNative API for gas fees
  • Base network for transactions
background image mobile

Join the mailing list

Get the latest news and updates