SnowMindDocs
Launch App

How SnowMind Works

SnowMind is built around three layers: a web app for user interaction, an optimization engine for yield decisions, and on-chain smart accounts for fund custody.

System Architecture

┌──────────────────────────────────────────────────────┐
│  WEB APP                                             │
│  Authentication → ZeroDev Smart Account → Dashboard  │
└────────────────────┬─────────────────────────────────┘
                     │ HTTPS
┌────────────────────▼─────────────────────────────────┐
│  OPTIMIZATION ENGINE                                 │
│  Rate Fetcher → Allocator → Rebalancer → Executor    │
└────────────────────┬─────────────────────────────────┘
                     │ ERC-4337 UserOperations
┌────────────────────▼─────────────────────────────────┐
│  AVALANCHE C-CHAIN                                   │
│  ZeroDev Kernel v3.1 Smart Accounts                  │
│  Pimlico Paymaster (gas sponsoring)                  │
│  Whitelisted Lending & Yield Adapters                │
└──────────────────────────────────────────────────────┘

Web App

The web app handles user-facing interactions:

  • Authentication: Wallet connect, email, and social login
  • Smart account creation: ZeroDev Kernel v3.1 (ERC-4337 + ERC-7579)
  • Session key grant: Scoped permissions signed by the user
  • Dashboard: Real-time portfolio view, allocation breakdown, and rebalance history

Optimization Engine

The backend optimization engine orchestrates the entire yield optimization loop:

  1. Rate Fetcher: Reads on-chain APY from each protocol every 30 minutes
  2. TWAP Smoothing: Applies 15-minute time-weighted averaging to prevent spot-rate manipulation
  3. Cross-Validation: Compares on-chain rates against DefiLlama's yield API
  4. Optimizer: Ranks protocols by APY and allocates capital optimally
  5. Rebalancer: Builds ERC-4337 UserOperations for withdrawals and deposits
  6. Executor: Signs UserOps with the session key and submits via Pimlico bundler

On-Chain

All fund custody happens on Avalanche C-Chain through ERC-4337 smart accounts:

  • ZeroDev Kernel v3.1: Smart account with modular validators and executors
  • Pimlico Paymaster: Sponsors gas for all rebalancing transactions (free to users)
  • Protocol interactions: Direct supply/withdraw via approved protocol adapters

The Rebalancing Loop

Every 30 minutes, the backend runs the following loop for each account:

  1. Fetch current APY from all active protocols
  2. Smooth rates with TWAP and cross-validate against DefiLlama
  3. Run the optimizer to compute the optimal allocation
  4. Check if the rebalance meets all safety gates (see below)
  5. If approved, build and execute a batch UserOperation

Rebalance Safety Gates

A rebalance only executes when all conditions are met: total movement exceeds $1, APY improvement exceeds 0.1%, daily yield gain exceeds gas cost, at least 6 hours since last rebalance, and no rate anomalies detected.

Fee Model

SnowMind charges 10% on profits only. There are no deposit fees, no management fees, and gas costs are sponsored.

Key Design Decisions

  • Yield optimizer: Ranks protocols by APY and allocates capital to maximize your blended yield — transparent, auditable, and deterministic.
  • ZeroDev Kernel v3.1: Native ERC-7579 modular smart accounts with EntryPoint v0.7 and 6M+ accounts deployed in production.
  • Avalanche-native: Gas costs are significantly lower than on Ethereum, allowing the agent to rebalance even when APY improvements are relatively small.
  • Non-custodial by design: Session keys enforce supply/withdraw-only permissions at the EVM level. Even a fully compromised backend cannot steal funds.