Skip to content

lycantho/Della

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Della - Agentic Consumer DeFi on Sonic Network

"If your grandma can do it, anyone can do it!" 🎯

Della image

An AI-powered DeFi platform that makes decentralized finance accessible to everyone through natural language interaction, gasless smart wallets, and cross-chain portfolio management powered by Orby.

πŸš€ What It Does

Della transforms complex DeFi operations into simple conversations:

  • πŸ€– AI Assistant: Natural language commands for all DeFi operations
  • ⚑ Gasless Smart Wallets: ERC-4337 accounts powered by Pimlico
  • πŸ”— MetaMask Integration: Import existing wallets seamlessly
  • πŸ“Š Real-time DeFi Data: Live yield opportunities and protocol information
  • πŸ”„ Batch Transactions: Multiple operations in a single gasless transaction
  • 🌐 Cross-Chain Holdings: Unified portfolio view across all chains via Orby
  • πŸ’Ό Portfolio Management: Automated DeFi strategies and yield farming
  • πŸŒ‰ Cross-Chain Bridging: Seamless asset transfers between networks

✨ Key Features

Smart Wallet Management

  • Create new ERC-4337 smart wallets instantly
  • Import existing MetaMask wallets with private key
  • Gasless transactions on Sonic Network
  • Social recovery ready
  • Multi-wallet support with individual management

AI-Powered Commands

"Create a new wallet"
"Import my MetaMask wallet"
"Send 0.1 SONIC to 0x1234..."
"Check my balance"
"Show me yield opportunities"
"Batch send from wallet 1"
"Show my holdings across all chains"
"Create portfolio with $100"
"Bridge 0.5 ETH from Ethereum to Sonic"

Cross-Chain Portfolio Analysis

  • Orby Integration: Unified view of all your tokens across multiple chains
  • Real-time Holdings: Live token balances and USD values
  • Chain Distribution: See how your wealth is distributed across networks
  • Gas Optimization: Identify the best tokens for gas payments
  • Multi-chain Support: Ethereum, Sonic, Polygon, Arbitrum, Optimism, Base, BSC, and more

DeFi Integration

  • Real-time yield data from DeFiLlama
  • Protocol recommendations
  • TVL tracking
  • Top chains and protocols information
  • Automated portfolio strategies

Cross-Chain Bridging

  • Bridge assets between major networks
  • Support for Ethereum, Sonic, Polygon, and more
  • Optimized routing for best rates
  • Gas cost estimation

πŸ› οΈ Tech Stack

  • Frontend: React + TypeScript + Tailwind CSS
  • Backend: ElizaOS AI Framework
  • Blockchain: Sonic Network (Blaze Testnet) + Multi-chain support
  • Smart Accounts: ERC-4337 with Pimlico
  • DeFi Data: DeFiLlama API
  • Cross-Chain: Orby Protocol integration
  • AI: OpenAI/Anthropic integration
  • Portfolio Management: Automated DeFi strategies

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ or Bun
  • MetaMask wallet (optional)
  • Orby API access (for cross-chain features)

Installation

# Clone the repository
git clone <your-repo-url>
cd Della

# Install dependencies
npm install
# or
bun install

# Set up environment variables
cp .env.example .env
# Add your API keys to .env

# Start development server
npm run dev
# or
bun run dev

Environment Variables

Create a .env file in the root directory with the following variables:

# AI Provider (choose one)
OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_anthropic_key
OPENROUTER_API_KEY=your_openrouter_key
OPENROUTER_SMALL_MODEL=mistralai/mistral-small-3.2-24b-instruct:free
OPENROUTER_LARGE_MODEL=mistralai/mistral-small-3.2-24b-instruct:free
OPENROUTER_IMAGE_MODEL=mistralai/mistral-small-3.2-24b-instruct:free

# Pimlico API (for gasless transactions)
PIMLICO_API_KEY=your_pimlico_api_key

# Orby Integration (for cross-chain features)
ORBY_PRIVATE_INSTANCE_URL=your_orby_private_instance_url

# Blockchain Configuration
PRIVATE_KEY=your_private_key_for_deployment
REPORT_GAS=true

# Optional: Discord/Telegram bots
DISCORD_API_TOKEN=your_discord_token
TELEGRAM_BOT_TOKEN=your_telegram_token

# Optional: Ignore bootstrap
IGNORE_BOOTSTRAP=false

Required API Keys

  1. AI Provider: Choose one of OpenAI, Anthropic, or OpenRouter
  2. Pimlico API: Get your API key from Pimlico
  3. Orby API: Required for cross-chain features from Orby
  4. Private Key: Your wallet private key for deployment (keep secure!)

πŸ“š Documentation Flow

Getting Started

  1. Setup: Follow the installation steps above
  2. Configuration: Set up your .env file with required API keys
  3. Deploy: Deploy smart contracts to Sonic Blaze Testnet
  4. Test: Try the basic wallet creation and management features

Core Features

1. Smart Wallet Management

  • Create Wallet: Generate new ERC-4337 smart wallets
  • Import Wallet: Import existing MetaMask wallets
  • Gasless Transactions: Send tokens without gas fees
  • Batch Operations: Multiple transactions in one gasless call

2. Cross-Chain Portfolio Analysis

  • Unified View: See all tokens across all chains
  • Real-time Balances: Live updates of token values
  • Chain Distribution: Understand your portfolio allocation
  • Gas Optimization: Find best tokens for gas payments

3. DeFi Portfolio Management

  • Automated Strategies: Set-and-forget DeFi strategies
  • Yield Farming: Optimize for highest APY opportunities
  • Risk Management: Diversified portfolio allocation
  • Performance Tracking: Monitor your DeFi returns

4. Cross-Chain Bridging

  • Asset Transfers: Bridge tokens between networks
  • Optimized Routing: Best rates and lowest fees
  • Status Tracking: Monitor bridge transaction progress

Advanced Usage

Portfolio Management Commands

# Create a balanced portfolio
"Create portfolio with $100 SONIC"

# Check portfolio performance
"Show my portfolio performance"

# Rebalance portfolio
"Rebalance my portfolio now"

# Add new tokens
"Add wBTC to my portfolio"

Cross-Chain Operations

# View all holdings
"Show my holdings across all chains"

# Check specific chain
"Show my Ethereum holdings"

# Optimize gas payments
"Which tokens should I use for gas?"

Smart Wallet Operations

# Create new wallet
"Create a new smart wallet"

# Import existing wallet
"Import my MetaMask wallet"

# Send tokens
"Send 10 SONIC to 0x1234..."

# Batch transactions
"Send 5 SONIC to wallet 1 and 3 SONIC to wallet 2"

🎯 Usage Examples

Creating a Wallet

User: "I need a new wallet"
AI: βœ… Your new smart wallet has been created!
    πŸ“ Smart Contract Address: 0x...
    πŸ”‘ EOA Address: 0x...
    πŸ” Private Key: 0x...
    🌐 Network: Sonic Blaze Testnet

Cross-Chain Holdings Analysis

User: "Show my holdings across all chains"
AI: πŸ’Ž PORTFOLIO OVERVIEW (Orby-Powered)

    πŸ”— Wallet: 0xB240...909a
    πŸ’° Total Value: $1,230.05
    🌐 Coverage: 9 chains β€’ 9 tokens

    πŸ“Š CHAIN DISTRIBUTION
    πŸ₯‡ Ethereum Sepolia $1,021.85 (83.1%)
    πŸ₯ˆ Optimism Sepolia $1,021.85 (83.1%)
    πŸ₯‰ Arbitrum Sepolia $1,021.85 (83.1%)

    πŸͺ™ TOKEN BREAKDOWN
    β”‚ ETH 0.0500 $993.30 β€’ Holesky
    β”‚ USDC <0.001 $28.55 β€’ Ethereum Sepolia
    β”‚ SONIC 0.1234 $123.86 β€’ Sonic Blaze Testnet

Portfolio Management

User: "Create portfolio with $100"
AI: 🎯 Creating your DeFi portfolio...
    πŸ’° Initial Investment: $100
    πŸ“Š Strategy: Balanced (Yield + Growth)
    πŸ”„ Auto-rebalancing: Enabled
    πŸ“ˆ Expected APY: 8-15%

πŸ§ͺ Testing

# Run all tests
npm test

# Component tests only
npm run test:component

# E2E tests only
npm run test:e2e

# Cypress tests
npm run cy:test

πŸ“ Project Structure

src/
β”œβ”€β”€ smart-account-plugin/     # ERC-4337 wallet management
β”‚   β”œβ”€β”€ action.ts            # Wallet actions (create, import, send)
β”‚   β”œβ”€β”€ holdingsActions.ts   # Cross-chain holdings analysis
β”‚   β”œβ”€β”€ eoaActions.ts        # EOA wallet management
β”‚   β”œβ”€β”€ service.ts           # Pimlico wallet service
β”‚   └── provider.ts          # Blockchain interactions
β”œβ”€β”€ portfolio-plugin/         # DeFi portfolio management
β”‚   β”œβ”€β”€ service.ts           # Portfolio service
β”‚   β”œβ”€β”€ actions/             # Portfolio actions
β”‚   └── keeper/              # Automated strategies
β”œβ”€β”€ bridge-plugin/            # Cross-chain bridging
β”‚   β”œβ”€β”€ action.ts            # Bridge actions
β”‚   β”œβ”€β”€ service.ts           # Bridge service
β”‚   └── provider.ts          # Bridge providers
β”œβ”€β”€ defillama-plugin/        # DeFi data integration
β”‚   β”œβ”€β”€ action.ts            # DeFi data actions
β”‚   β”œβ”€β”€ service.ts           # DeFiLlama service
β”‚   └── provider.ts          # API interactions
β”œβ”€β”€ frontend/                # React UI components
└── index.ts                 # Main entry point

πŸ”§ Development

# Start development with hot-reloading
npm run dev

# Build for production
npm run build

# Type checking
npm run type-check

# Format code
npm run format

🌐 Network Information

Primary Network

Supported Networks (via Orby)

  • Ethereum: Mainnet, Sepolia, Goerli
  • Sonic: Mainnet, Blaze Testnet
  • Polygon: Mainnet, Mumbai, Amoy
  • Arbitrum: One, Goerli, Sepolia
  • Optimism: Mainnet, Goerli, Sepolia
  • Base: Mainnet, Goerli, Sepolia
  • BSC: Mainnet, Testnet
  • Holesky: Testnet
  • Sonic: Blaze Testnet

πŸš€ Advanced Features

Cross-Chain Holdings

  • Unified View: See all your tokens across all chains in one place
  • Real-time Updates: Live balance and value updates
  • Gas Optimization: Identify the best tokens for gas payments on each chain
  • Portfolio Analytics: Chain distribution and token breakdown

Portfolio Management

  • Automated Strategies: Set-and-forget DeFi strategies
  • Yield Farming: Optimize for highest APY opportunities
  • Risk Management: Diversified portfolio allocation
  • Performance Tracking: Monitor your DeFi returns

Smart Account Features

  • Gasless Transactions: No more gas fees for basic operations
  • Batch Transactions: Multiple operations in one transaction
  • Social Recovery: Secure wallet recovery options
  • Multi-signature: Enhanced security for large transactions

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments


Built with ❀️ for the Sonic Ecosystem

Making DeFi accessible to everyone! πŸ‘΅πŸ’™

About

An AI-powered DeFi platform that makes decentralized finance accessible to everyone through natural language interaction, gasless smart wallets, and cross-chain portfolio management powered by Orby.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors