Skip to content

CryptoSmartNow/bitsave-miniapp

Repository files navigation

πŸ’° BitSave β€” Multi-Chain Crypto Savings Vault for Farcaster

BitSave Logo

BitSave is a Farcaster MiniApp that empowers crypto users to save and earn yield on their digital assets without losing to market volatility. Built specifically for the Farcaster ecosystem, BitSave makes saving a social experience while providing secure, yield-generating vaults across multiple blockchain networks.


🌐 Platform Overview

What is BitSave?

BitSave is a Farcaster MiniApp β€” a web application that runs natively within Farcaster clients like Warpcast. It leverages Farcaster's social graph and wallet infrastructure to create a seamless saving experience for crypto users.

Farcaster Integration

  • Native MiniApp: Built using the Farcaster MiniApp SDK
  • Wallet Integration: Direct integration with users' Farcaster wallets (no external wallet connections needed)
  • Social Features: Share savings achievements as Farcaster casts
  • Identity: Uses Farcaster profiles and social connections
  • Distribution: Discoverable through Farcaster's MiniApp catalog

πŸ”— Supported Networks & Assets

Base Network (Ethereum L2)

  • Chain ID: 8453
  • Primary Token: USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913)
  • Contract Address: 0x3593546078eecd0ffd1c19317f53ee565be6ca13
  • Gas Token: ETH
  • Explorer: BaseScan

Celo Network

  • Chain ID: 42220
  • Supported Tokens:
    • cUSD (0x765de816845861e75a25fca122bb6898b8b1282a): Celo Dollar
    • USDGLO (0x4f604735c1cf31399c6e711d5962b2b3e0225ad3): Global Dollar
  • Contract Address: 0x7d839923Eb2DAc3A0d1cABb270102E481A208F33
  • Gas Token: CELO
  • Explorer: Celoscan

πŸš€ Core Features

🏦 Savings Vault Creation

  • Custom Naming: Personalize your savings goals
  • Multi-Network Support: Choose between Base and Celo networks
  • Flexible Deposits: Start with any amount (including $0)
  • Duration Controls: Set saving periods with optional penalties for early withdrawal
  • Asset Selection: Support for USDC, cUSD, USDGLO, and more

πŸ’Έ Smart Top-Up System

  • Manual Deposits: Add funds to your vault anytime
  • Earnings Detection: Automatic monitoring of wallet activity
  • Smart Suggestions: AI-powered recommendations based on earning patterns
  • Batch Operations: Efficiently manage multiple savings plans

πŸ”” Intelligent Notifications

  • Wallet Activity Monitoring: Track incoming payments and earnings
  • Contextual Prompts: "You earned $50 this week. Save 30% in your Emergency Fund?"
  • Customizable Alerts: Control notification frequency and types
  • Social Integration: Option to share savings milestones

πŸ“’ Social Sharing

  • Cast Integration: Share savings achievements as Farcaster casts
  • Achievement Badges: Unlock and display saving milestones
  • Community Features: Connect with other savers in your network
  • Referral System: Earn rewards for bringing friends to BitSave

πŸ₯‡ Leaderboard & Gamification

Track and compete with the community across multiple metrics:

  • Total Saved: Lifetime savings across all vaults
  • Yield Earned: Total returns generated
  • Vault Count: Number of active savings plans
  • Consistency Score: Regularity of saving habits

Filter Options:

  • All users (global leaderboard)
  • Friends only (social network)
  • Network-specific (Base vs Celo)
  • Time-based (weekly, monthly, all-time)

βš™οΈ Advanced Settings

  • Notification Controls: Fine-tune alert preferences
  • Auto-Save (Coming Soon): Automated percentage-based saving
  • Privacy Settings: Control sharing and leaderboard visibility
  • Security Options: Multi-signature and recovery settings

πŸ—οΈ Technology Stack

Frontend Architecture

  • Framework: Next.js 15 with React 19
  • Styling: Tailwind CSS with custom design system
  • Typography: Space Grotesk font family
  • Animations: Framer Motion for smooth interactions
  • State Management: React Query + Wagmi for blockchain state

Blockchain Integration

  • Wallet Connection: Wagmi + Farcaster MiniApp Connector
  • Smart Contracts: Solidity contracts deployed on Base and Celo
  • Web3 Libraries:
    • Ethers.js for contract interactions
    • Viem for typed blockchain operations
  • Chain Support: Multi-chain architecture with network switching

Farcaster Integration

Backend & Data

  • Database: MongoDB with Mongoose ODM
  • API Routes: Next.js API routes for server-side logic
  • External APIs:
    • Price Feeds: Real-time token pricing across networks
    • Wallet Activity: Transaction monitoring and analysis
    • Notifications: Webhook-based alert system

Development Tools

  • Package Manager: PNPM for efficient dependency management
  • TypeScript: Full type safety across the application
  • Linting: ESLint with Next.js configuration
  • Formatting: Prettier for consistent code style
  • Build: Turbopack for fast development builds

πŸ”§ Local Development

Prerequisites

  • Node.js: v18+ (recommended: v20+)
  • PNPM: v8+ (or npm/yarn)
  • MongoDB: Local instance or MongoDB Atlas
  • Farcaster Account: For testing MiniApp features

Quick Start

# Clone the repository
git clone https://github.com/CryptoSmartNow/bitsave-miniapp.git
cd bitsave-miniapp

# Install dependencies
pnpm install

# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your configuration

# Run development server
pnpm dev

Environment Configuration

Create a .env.local file with the following variables:

# App Configuration
NEXT_PUBLIC_URL=http://localhost:3000
NEXT_PUBLIC_ENVIRONMENT=development

# Blockchain Networks
NEXT_PUBLIC_BASE_RPC_URL=https://mainnet.base.org
NEXT_PUBLIC_CELO_RPC_URL=https://forno.celo.org

# Smart Contract Addresses
NEXT_PUBLIC_BASE_VAULT_CONTRACT=0x3593546078eecd0ffd1c19317f53ee565be6ca13
NEXT_PUBLIC_CELO_VAULT_CONTRACT=0x7d839923Eb2DAc3A0d1cABb270102E481A208F33

# Database
MONGODB_URI=mongodb://localhost:27017/bitsave

# External APIs
NEYNAR_API_KEY=your_neynar_api_key
ALCHEMY_API_KEY=your_alchemy_api_key

# Farcaster Integration
NEXT_PUBLIC_FARCASTER_DEVELOPER_FID=your_fid
FARCASTER_DEVELOPER_MNEMONIC=your_mnemonic

Available Scripts

# Development
pnpm dev          # Start development server with Turbopack
pnpm build        # Build for production
pnpm start        # Start production server
pnpm lint         # Run ESLint
pnpm format       # Format code with Prettier
pnpm ci           # Run CI checks (format + build)

Testing MiniApp Features

  1. Local Development: Use ngrok or similar tunneling service to expose localhost
  2. Farcaster Preview: Test using Farcaster's MiniApp preview tool
  3. Wallet Integration: Connect using Farcaster's development wallet

πŸ“± How It Works

1. Vault Creation Flow

User connects Farcaster wallet β†’
Selects network (Base/Celo) β†’
Chooses token (USDC/cUSD/USDGLO) β†’
Sets savings goal and duration β†’
Contract deployment β†’
Vault ready for deposits

2. Earning Detection

Webhook monitors wallet β†’
Detects incoming transactions β†’
Calculates earning patterns β†’
Triggers smart suggestions β†’
User can save percentage of earnings

3. Yield Generation

User deposits funds β†’
Smart contract allocates to yield strategies β†’
Interest compounds automatically β†’
User can withdraw principal + yield β†’
Penalty applied for early withdrawal (if set)

4. Social Integration

User achieves savings milestone β†’
Option to cast achievement β†’
Appears in Farcaster feed β†’
Friends can interact and be inspired β†’
Referral rewards distributed

πŸ›‘οΈ Security & Audits

Smart Contract Security

  • Audited Contracts: All vault contracts undergo security audits
  • Time Locks: Critical functions protected by time delays
  • Multi-Signature: Administrative functions require multiple signatures
  • Upgradeable Contracts: Proxy pattern for secure upgrades

Data Protection

  • No Private Keys: All wallet operations through Farcaster's secure infrastructure
  • Encrypted Storage: Sensitive user data encrypted at rest
  • HTTPS Only: All communications secured with TLS
  • Privacy First: Minimal data collection, user-controlled sharing

🀝 Contributing

We welcome contributions to BitSave! Here's how you can help:

Development

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Bug Reports

  • Use GitHub Issues for bug reports
  • Include reproduction steps
  • Provide browser/device information
  • Include screenshots if relevant

Feature Requests

  • Open a GitHub Issue with the "enhancement" label
  • Describe the use case and expected behavior
  • Include mockups or examples if helpful

πŸ“œ License

MIT License Β© 2025 BitSave

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.


Start saving smarter today with BitSave β€” where crypto savings meets social incentives! πŸ’°

About

Web3 Savings Protocol

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •