Skip to content

Latest commit

 

History

History
230 lines (177 loc) · 7.15 KB

File metadata and controls

230 lines (177 loc) · 7.15 KB

Enzyme Protocol Migration Guide

This guide will help you migrate from your custom smart contract implementation to Enzyme Protocol's professional vault infrastructure.

Why Migrate to Enzyme Protocol?

Current Challenges with Custom Implementation

  • Complex smart contract management: Manual NAV calculation, share management
  • Security risks: Custom contracts need extensive auditing
  • Limited functionality: Basic deposit/withdraw only
  • No multi-protocol access: Stuck with basic investment options
  • Manual portfolio management: No automated rebalancing or advanced features

Enzyme Protocol Benefits

  • Professional Infrastructure: Battle-tested, audited smart contracts
  • Automated NAV Calculation: Real-time portfolio valuation
  • Multi-Protocol Access: Integrate with 30+ DeFi protocols
  • Institutional Grade: Used by hundreds of professional managers
  • Compliance Ready: Built-in KYC/AML capabilities
  • Focus on Your Core Value: Spend time on signals, not infrastructure

Migration Steps

Step 1: Create Your Enzyme Vault

  1. Visit Enzyme App: Go to https://app.enzyme.finance

  2. Connect Wallet: Use the wallet that will own/manage the vault

  3. Create Vault:

    • Choose vault name (e.g., "Maxxit Signal Fund")
    • Select denomination asset (USDC recommended)
    • Configure fees (management fee, performance fee)
    • Set up policies (optional: whitelists, limits)
  4. Get Vault Addresses: After creation, note down:

    • Vault Proxy Address
    • Comptroller Address

Step 2: Generate Enzyme API Key

  1. Get API Access: Go to https://app.enzyme.finance/account/api-tokens
  2. Create New Token: Generate an API key for your application
  3. Save Securely: Store this key safely (it provides read access to vault data)

Step 3: Update Environment Variables

Add these to your .env.local file:

# Enzyme Protocol Configuration
NEXT_PUBLIC_ENZYME_VAULT_ADDRESS=0x1234...  # Your vault proxy address
NEXT_PUBLIC_ENZYME_COMPTROLLER_ADDRESS=0x5678...  # Your comptroller address
NEXT_PUBLIC_ENZYME_API_KEY=your_api_key_here

Step 4: Install Dependencies

The new Enzyme integration requires:

npm install @enzymefinance/api
# or
yarn add @enzymefinance/api

Step 5: Deploy and Test

  1. Start Development Server: npm run dev
  2. Navigate to: /invest-enzyme (new Enzyme-powered page)
  3. Test Deposit Flow:
    • Connect wallet
    • Approve USDC (or your denomination asset)
    • Make a small test deposit
  4. Verify: Check your vault on app.enzyme.finance

Key Differences: Custom vs Enzyme

Feature Custom Contract Enzyme Protocol
Setup Complexity High (deploy, test, audit) Low (create via UI)
NAV Calculation Manual implementation Automatic
Asset Support Limited 100+ assets
Protocol Integration Manual development 30+ protocols built-in
Security Self-audited Professionally audited
Upgradability Complex migrations Seamless upgrades
Compliance Custom implementation Built-in tools
Development Time Weeks/months Hours

Code Architecture Changes

Old Architecture (Custom Contract)

Frontend → Custom Smart Contract → Manual Calculations

New Architecture (Enzyme)

Frontend → Enzyme SDK/API → Enzyme Protocol → Multiple DeFi Protocols

Investment Flow Comparison

Custom Contract Flow

  1. User deposits ETH
  2. Contract stores ETH + mints custom shares
  3. Manual calculations for NAV
  4. Limited to basic operations

Enzyme Protocol Flow

  1. User deposits USDC (or any denomination asset)
  2. Enzyme mints standardized ERC-20 shares
  3. Automatic NAV calculation across all positions
  4. Professional vault operations (fees, policies, etc.)
  5. Access to advanced DeFi strategies

Signal Integration Strategy

With Enzyme Protocol, you can focus entirely on your core value proposition:

1. Signal Generation

  • Twitter sentiment analysis
  • Technical indicators
  • Market data processing
  • AI/ML predictions

2. Investment Decisions

  • Which tokens to buy/sell
  • Position sizing
  • Risk management
  • Timing strategies

3. Enzyme Handles Everything Else

  • Vault management
  • NAV calculation
  • Share issuance/redemption
  • Compliance
  • Multi-protocol execution

Trading Implementation with Enzyme

Your trading strategies can be implemented through:

  1. Manual Trading: Execute trades through Enzyme's interface
  2. API Integration: Use Enzyme's API for programmatic trading
  3. Custom Adapters: Build custom integrations for specific protocols
  4. Automated Strategies: Set up rules-based trading

Example strategy integration:

// Your signal generation
const signals = await generateTradingSignals();

// Execute through Enzyme (via Integration Manager)
for (const signal of signals) {
  await executeTradeOnEnzyme({
    vault: vaultAddress,
    action: signal.action, // 'buy' | 'sell'
    asset: signal.token,
    amount: signal.amount
  });
}

Migration Timeline

Phase 1: Preparation (1-2 days)

  • Create Enzyme vault
  • Get API keys
  • Update environment variables
  • Test new interface

Phase 2: Parallel Operation (1 week)

  • Run both systems side by side
  • Migrate small amounts to Enzyme
  • Verify functionality
  • Train users on new interface

Phase 3: Full Migration (1 day)

  • Migrate remaining funds
  • Switch default interface to Enzyme
  • Archive old contract

Phase 4: Enhancement (Ongoing)

  • Implement advanced trading strategies
  • Add new protocol integrations
  • Optimize performance

Cost Comparison

Custom Contract Costs

  • Development: $10,000-50,000
  • Auditing: $5,000-15,000
  • Maintenance: $2,000-5,000/month
  • Risk: High (security vulnerabilities)

Enzyme Protocol Costs

  • Setup: $0 (free vault creation)
  • Enzyme Protocol Fee: 0.25% annually
  • Development: Minimal (days vs months)
  • Risk: Low (battle-tested infrastructure)

Support and Resources

Enzyme Documentation

Community

Professional Services

  • Enzyme offers consulting for complex integrations
  • Grant program available for innovative projects
  • Technical support for builders

Next Steps

  1. Create your Enzyme vault following Step 1 above
  2. Test the new interface at /invest-enzyme
  3. Implement your signal integration using the provided architecture
  4. Gradually migrate users from the old system
  5. Focus on your core value - signal generation and market insights

Ready to migrate? Start by creating your Enzyme vault at app.enzyme.finance and follow this guide step by step.

The future of your investment platform is professional, secure, and focused on what you do best - generating alpha through superior market insights.