🔥 Coming Soon

HypeFlow Architecture

Understanding how our system leverages social sentiment for automated trading on Aptos

System Architecture

HypeFlow AI combines social data analysis with blockchain operations to create a powerful automated trading system.

(1) Collect & Score
(2) Decision Logic
(3a) On-Chain Action
(3b) Social Feedback
Twitter API /
Social Data Stream
Sentiment
Analyzer
Decision Logic
On-Chain Action
Social Feedback
Move Agent Kit
(Aptos)
Twitter Post/
Telegram Bot, etc
Event Logs

Core Components

Liquidswap Integration

Handles token swapping between APT and stablecoins with sentiment-based trade execution and confidence scoring.

src/lib/liquidswap.ts
  • Token swapping functionality
  • Sentiment-based execution
  • Confidence calculation
  • Twitter integration

Thala Staking

Manages APT staking operations with the Thala protocol, including staking, unstaking, and balance tracking.

src/lib/thala-service.ts
  • APT staking/unstaking
  • APY estimation
  • Balance tracking
  • Reward monitoring

Joule Lending

Provides lending and borrowing functionality through the Joule platform with position management.

src/lib/joule-service.ts
  • Token lending
  • Collateral management
  • Position tracking
  • Interactive CLI

Agent System

HypeFlow Agent

The main agent that monitors social sentiment and executes trading decisions.

scripts/hypeflow-agent.ts
  • Twitter sentiment monitoring
  • Trading decision making
  • On-chain execution
  • Performance logging

Agent Management

Handles agent orchestration and configuration management.

scripts/runAgent.ts & runAllAgents.ts
  • Agent configuration
  • Multi-agent orchestration
  • Performance monitoring
  • Resource management

System Workflow

Data Collection & Analysis

Our system continuously monitors social media platforms for relevant signals about Aptos-based projects. The sentiment analyzer processes this data using advanced NLP techniques to identify trading opportunities based on social momentum.

Automated Decision Logic

Based on the sentiment analysis, our decision engine determines whether to execute trades and what positions to take, optimizing for both risk management and return potential using configurable thresholds and AI-powered optimization.

Blockchain Integration

Trading actions are executed directly on the Aptos blockchain using the Move Agent Kit, ensuring efficient and secure transactions that leverage the full power of Move's resource-oriented programming model.

Feedback Loop

The system creates a virtuous cycle by posting notable trades and insights back to social platforms, which can generate additional market movement and create new trading opportunities.

Technical Infrastructure

Agent Server

Web server providing real-time management and monitoring of agents.

scripts/agent-server.ts
  • WebSocket updates
  • RESTful API endpoints
  • Agent control interface
  • Performance monitoring

Transaction Monitoring

Comprehensive system for tracking on-chain activity.

scripts/transactionAlert.ts & whaleAlert.ts
  • Transaction tracking
  • Whale movement detection
  • Alert system
  • Performance metrics

System Configuration

const CONFIG = {
  hashtagsToTrack: ["#Aptos"],
  decisionConfig: {
    bullishThreshold: 0.4,
    bearishThreshold: -0.2,
    minTweetVolume: 5,
    timeWindowMinutes: 60,
    maxPositionSize: 10,
  },
  checkIntervalMinutes: 10,
  twitterPostResults: true,
  mockMode: false,
};