Skip to content
This repository was archived by the owner on Aug 8, 2026. It is now read-only.
This repository was archived by the owner on Aug 8, 2026. It is now read-only.

Orbitl - Developer Documentation #2

Description

@pushkarm029

Overview

Orbitl is a natural language DeFi automation agent built on Sei blockchain that enables users to execute complex DeFi operations through conversational commands.

Tech Stack

  • AI Agent: Crossmint GOAT Framework
  • Blockchain: Sei Network (sub-400ms finality)
  • Backend: Node.js, Express, Socket.io, PostgreSQL
  • Frontend: React, WebSocket client
  • Integrations: DEX protocols, Staking modules, Price oracles

Development Milestones

Milestone 0: Foundation Setup

Prerequisites before any features

  • Authentication System

    • JWT-based auth with refresh tokens
    • Session management
    • API key generation for bot access
  • Wallet Integration

    • Sei wallet connection (Compass, Fin, Keplr)
    • Address verification
    • Transaction signing setup
    • Multi-wallet support
  • Database Setup

    • PostgreSQL with proper schemas
    • User profiles and wallet associations
    • Transaction history tables
    • Redis for caching and session storage
  • Infrastructure

    • WebSocket server for real-time communication
    • Message queue for async operations
    • Error logging and monitoring (Sentry/DataDog)
    • Rate limiting and DDoS protection

Milestone 1: Core Chat & Transactions

Basic conversational DeFi operations

  • Natural Language Processing

    • Command parsing: "Send 10 SEI to address"
    • Intent recognition and parameter extraction
    • Error handling for ambiguous commands
  • Basic Transactions

    • Send/receive SEI and tokens
    • Balance checking across all tokens
    • Transaction history and status tracking
    • Gas estimation and optimization
  • Chat Interface

    • Real-time message streaming
    • Transaction preview cards
    • Confirmation/cancellation flow
    • Transaction receipts and notifications

Milestone 2: DEX Operations

Token swapping and liquidity management

  • Multi-DEX Integration

    • DragonSwap and Astroport connections
    • Best route finding across DEXs
    • Slippage protection (configurable)
  • Swap Features

    • Token-to-token swaps: "Swap 100 USDC for SEI"
    • Price impact calculations
    • Real-time price feeds (CoinGecko, Sei oracles)
    • Failed transaction handling and retry logic
  • Liquidity Operations

    • Add/remove liquidity: "Add liquidity to SEI/USDC pool"
    • LP token tracking
    • Impermanent loss calculations
    • Pool analytics and APY display

Milestone 3: Staking System

Validator staking and reward management

  • Staking Operations

    • Stake with specific or best validator
    • Validator selection algorithm (APY, commission, uptime)
    • Unstaking with proper unbonding period handling
  • Reward Management

    • Reward tracking and claiming
    • Auto-compound functionality
    • Historical reward analytics
    • APY/APR calculations
  • Validator Analytics

    • Real-time validator performance metrics
    • Commission changes alerts
    • Slashing risk indicators

Milestone 4: Automation Engine

Scheduled and conditional operations

  • Dollar-Cost Averaging (DCA)

    • Recurring purchases: "Buy $50 SEI weekly"
    • Multiple DCA strategies per user
    • Pause/resume/modify schedules
    • Failed execution handling
  • Conditional Execution

    • Price-based triggers: "Buy SEI when price < $1"
    • Portfolio-based conditions: "Rebalance when portfolio > $10k"
    • Gas-based optimization: "Execute when gas < 0.001"
    • Time-based scheduling
  • Portfolio Automation

    • Auto-rebalancing to target allocations
    • Stop-loss and take-profit orders
    • Yield optimization suggestions
    • Risk-adjusted portfolio recommendations

Milestone 5: Advanced Features

Enhanced user experience and analytics

  • Multi-Protocol Integration

    • 3+ additional Sei protocols (lending, yield farms)
    • Cross-protocol position tracking
    • Unified portfolio dashboard
    • Protocol risk scoring
  • Analytics & Reporting

    • P&L tracking with historical charts
    • Tax report generation
    • Performance vs market benchmarks
    • Gas spent analytics
  • Educational Mode

    • Step-by-step explanations for new users
    • Risk warnings and safety tips
    • DeFi terminology glossary
    • Interactive tutorials
  • Social Features

    • Copy trading functionality
    • Strategy sharing
    • Leaderboards (optional privacy)
    • Community sentiment integration

Performance Requirements

  • Response Times

    • Chat response: <2 seconds
    • Transaction execution: <5 seconds
    • Price updates: Real-time (5-second intervals)
    • Dashboard refresh: <1 second
  • Reliability

    • 99.9% uptime for core services
    • Automatic failover for critical operations
    • Transaction retry mechanism
    • Graceful degradation for non-critical features

Security Requirements

  • User Security

    • Private keys never touch servers
    • Client-side transaction signing
    • 2FA for sensitive operations
    • Session timeout and rotation
  • Platform Security

    • Input sanitization and validation
    • SQL injection prevention
    • Rate limiting per user/IP
    • CORS and CSP headers properly configured
  • Smart Contract Security

    • Slippage protection (default 1%, max 5%)
    • Approval limits
    • Reentrancy guards
    • Emergency pause functionality

Testing Strategy

  • Unit Tests: All utility functions and core logic
  • Integration Tests: API endpoints and database operations
  • E2E Tests: Critical user flows (send, swap, stake)
  • Load Testing: 1000+ concurrent users
  • Security Audit: Before mainnet deployment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions