Getting Started

Learn how to get started with Difract's AI-powered Solana platform and begin optimizing your yield strategies on the Solana blockchain.

Introduction

Difract is a cutting-edge AI-powered Solana platform that helps you discover, optimize, and manage yield opportunities across the Solana ecosystem. Through a natural language interface, Difract enables both beginners and experienced Solana users to navigate the high-speed, low-cost world of Solana DeFi with ease.

Note: Difract is designed to simplify Solana DeFi, but you should always do your own research before making investment decisions.

This guide will walk you through the essential steps to get started with Difract, from connecting your Solana wallet to making your first yield optimization query.

Quick Start

1

Connect Your Solana Wallet

Connect your preferred Solana wallet (Phantom, Solflare, Backpack) to access your on-chain portfolio.

Learn how
2

Set Your Preferences

Customize your risk tolerance, preferred Solana protocols, and investment goals to receive personalized recommendations.

See details
3

Make Your First Query

Ask Difract's AI agents to find Solana yield opportunities, analyze your portfolio, or build a custom strategy.

Try examples

Connecting Your Solana Wallet

To get the most out of Difract, you'll need to connect your Solana wallet. This allows Difract to analyze your existing positions, calculate potential optimizations, and execute transactions on your behalf when you approve them.

Supported Wallets

Browser Extensions

  • Phantom
  • Solflare
  • Backpack

Mobile Wallets

  • Phantom Mobile
  • Solflare Mobile
  • Sollet

Hardware Wallets

  • Ledger (via Solflare)
  • Ledger (via Phantom)
  • SafePal S1

Connection Steps

  1. Click the "Connect Wallet" button in the top-right corner of the dashboard
  2. Select your preferred Solana wallet from the available options
  3. Approve the connection request in your wallet
  4. Grant required permissions for Difract to view your Solana addresses and token balances
// Example: Programmatically connect using the Difract SDK
import { Difract } from '@difract/solana-sdk';

const difract = new Difract({
  apiKey: 'your-api-key',
  cluster: 'mainnet-beta' // 'mainnet-beta', 'testnet', or 'devnet'
});

// Connect wallet
const connection = await difract.wallet.connect({
  provider: window.phantom?.solana,
  commitment: 'confirmed', // 'processed', 'confirmed', or 'finalized'
  accountsOptions: {
    refreshInterval: 30000, // refresh every 30 seconds
    watchTokenBalances: true
  }
});

Setting Your Preferences

Customize your Difract experience by setting preferences that align with your Solana investment strategy and risk tolerance. These settings help Difract's AI agents provide more relevant recommendations.

Key Preferences

  • Risk Tolerance: Define your comfort level with different types of Solana protocols and strategies
  • Token Preferences: Specify which SPL tokens you're willing to hold or exclude
  • Fee Sensitivity: Set your priority fee and compute unit limits for Solana transactions
  • Yield Thresholds: Define minimum APY requirements for recommendations
  • Program Trust Level: Specify which Solana programs you're willing to interact with
// Example: Setting user preferences
await difract.user.setPreferences({
  riskTolerance: {
    level: 'moderate', // 'conservative', 'moderate', 'aggressive'
    maxImpermanentLoss: 5, // percentage
    maxLeverage: 2, // 2x leverage max
    protocolSecurity: {
      minAuditCount: 2,
      minTVLTimeInDays: 180, // 6 months minimum
      excludeProtocolTypes: ['undercollateralized-lending']
    }
  },
  assets: {
    preferred: ['SOL', 'USDC', 'mSOL', 'JitoSOL'],
    excluded: ['BONK', 'WIF']
  },
  feeSettings: {
    priorityFee: {
      max: 0.000005, // SOL
      strategy: 'medium' // 'low', 'medium', 'high', or 'adaptive'
    },
    computeUnits: {
      maxComputeUnits: 1_400_000,
      useHeapFrame: true
    },
    maxSlippage: 0.5 // percentage
  },
  yieldSettings: {
    minStablecoinAPY: 4.5, // percentage
    minVolatileAPY: 8.0, // percentage
    harvestThreshold: 100 // USD value to auto-harvest
  },
  programTrust: {
    allowedPrograms: 'audited', // 'audited', 'all', or 'custom'
    customAllowlist: ['JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4'] // Jupiter aggregator
  }
});

Making Your First Query

Difract's natural language interface allows you to ask questions and receive detailed answers about Solana DeFi opportunities, your portfolio, and potential optimizations.

Example Queries

Yield Discovery

  • "Show me the highest USDC yields on Solana"
  • "Find SOL liquid staking options with lowest fees"
  • "What are the top 5 stablecoin yields on Solana with lowest risk?"

Portfolio Analysis

  • "Analyze my Solana positions for potential optimizations"
  • "What's my exposure to Raydium protocol?"
  • "Calculate my projected monthly yield from all Solana positions"

Strategy Building

  • "Create a stable yield strategy with $10K USDC on Solana"
  • "Build a diversified SOL yield portfolio"
  • "Design a delta-neutral strategy for my SOL holdings"

Query Execution

When you submit a query, Difract's AI agents:

  1. Parse your natural language input to understand your intent
  2. Gather real-time data from the Solana blockchain and protocol APIs
  3. Apply your personal preferences and risk settings
  4. Generate detailed answers with actionable recommendations
  5. Provide transaction steps that you can execute with one click
// Example: Making a query programmatically
const response = await difract.query.ask({
  question: "Find the highest USDC yields with at least 100K liquidity on Solana",
  context: {
    assetAmount: 5000, // USD amount to simulate
    maxPositions: 3, // only show top 3 results
    includeRiskAnalysis: true,
    compareWithCurrentPositions: true
  }
});

// Accessing the response
console.log(response.recommendations); // Array of yield opportunities
console.log(response.riskAnalysis); // Risk metrics for each opportunity
console.log(response.transactions); // Suggested transaction steps

Next Steps