Get up and running with Yield Delta in minutes. This guide will walk you through installation, configuration, and deploying your first AI-powered vault.
Before starting, ensure you have:
bash# Clone with submodules for complete setup git clone --recurse-submodules https://github.com/yield-delta/yield-delta-protocol.git cd sei-dlp-core
bash# Install all dependencies using bun bun install # Install AI engine dependencies cd ai-engine pip install -r requirements.txt cd .. # Install Kairos (ElizaOS) dependencies cd kairos bun install cd ..
bash# Copy environment template cp .env.example .env.local # Edit with your configuration nano .env.local
Required environment variables:
bash# Core Configuration NEXT_PUBLIC_SEI_CHAIN_ID=1328 NEXT_PUBLIC_API_URL=http://localhost:3001/api NEXT_PUBLIC_VAULT_ADDRESS=0xYourVaultAddress # Demo Mode (optional) NEXT_PUBLIC_DEMO_MODE=true # AI Engine OPENAI_API_KEY=sk-your-openai-key AI_ENGINE_URL=http://localhost:8000 # ElizaOS Integration ELIZAOS_WS_URL=ws://localhost:8000/ws
bash# Start all services bun dev # Or start individual services: bun dev:frontend # Next.js frontend on :3000 bun dev:ai # AI engine on :8000 bun dev:kairos # ElizaOS agent on :3001
bashsei-dlp-core/ āāā src/ # Frontend application ā āāā app/ # Next.js App Router ā āāā components/ # React components ā āāā hooks/ # Custom React hooks ā āāā lib/ # Utility functions āāā contracts/ # Smart contracts (Solidity) āāā ai-engine/ # Python AI/ML engine āāā kairos/ # ElizaOS agent āāā docs/ # Documentation
Yield Delta uses SQLite for development and PostgreSQL for production:
bash# SQLite (automatic for development) # Database file: ./data/yield-delta.db # PostgreSQL (production) DATABASE_URL=postgresql://user:pass@localhost:5432/yielddelta
Deploy contracts to SEI testnet:
bashcd contracts # Install Foundry dependencies forge install # Deploy to SEI devnet forge script script/Deploy.s.sol \ --rpc-url https://evm-rpc-arctic-1.sei-apis.com \ --private-key $PRIVATE_KEY \ --broadcast # Verify contract forge verify-contract $CONTRACT_ADDRESS \ --chain-id 1328 \ --etherscan-api-key $SEISCAN_API_KEY
For safe testing, start with demo mode:
bash# Add to .env.local NEXT_PUBLIC_DEMO_MODE=true # Restart development server bun dev
Navigate to http://localhost:3000 and you'll see:
/vaults)/portfolio/rebalance)/market)Verify all services are running:
bash# Frontend health curl http://localhost:3000/api/health # AI engine health curl http://localhost:8000/health # Check API documentation curl http://localhost:3000/api/docs
bash# Build production version bun run build # Start production server bun start # Run tests bun test
bash# Kill processes on common ports lsof -ti:3000 | xargs kill -9 # Frontend lsof -ti:8000 | xargs kill -9 # AI Engine lsof -ti:3001 | xargs kill -9 # ElizaOS
bash# Verify environment loading bun run env-check # Debug environment in browser console.log(process.env)
bash# Clear cache and reinstall rm -rf node_modules bun.lockb bun install # Update dependencies bun update
Ready to optimize your yields with Yield Delta? Let's go! š