Skip to content

flip18731/FX-Arb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 FraxArb-KRW Demo

Autonomous Arbitrage Agent System between Frax Finance and KRWQ

Built with ADK-TS Patterns | Uses Mock Data for Demo Purposes


🎯 Overview

FraxArb-KRW is a hackathon demo showcasing an autonomous arbitrage agent that monitors price spreads between Frax Finance and KRWQ markets, making intelligent trading decisions based on market conditions.

Key Features

  • Real-time Market Monitoring: Continuously fetches mock market data every 5 seconds
  • Intelligent Decision Making: Agent analyzes spreads and executes trades based on:
    • BUY when spread < -0.2% (KRWQ undervalued)
    • SELL when spread > 0.5% (KRWQ overvalued)
    • HOLD when spread is within normal range
  • Chain of Thought Reasoning: Full transparency into agent's decision process
  • Professional Terminal UI: Beautiful colored output using chalk and ora
  • Cross-chain Bridge Simulation: Mocks FraxSwap bridge transactions

📦 Installation

npm install

🚀 Quick Start

npm start

The agent will start monitoring markets and making autonomous trading decisions. Press Ctrl+C to stop.


📁 Project Structure

frax-arb-krw/
├── src/
│   ├── types.ts           # TypeScript interfaces
│   ├── tools/
│   │   └── market.ts      # Mock market data & swap execution
│   ├── agent.ts           # ArbAgent class with decision logic
│   └── index.ts           # Main application loop
├── package.json
├── tsconfig.json
└── .env

🛠️ Technology Stack

  • TypeScript: Type-safe development
  • ts-node: Direct TypeScript execution
  • chalk: Terminal colors and styling
  • ora: Elegant terminal spinners
  • dotenv: Environment configuration

📊 Mock Data Details

  • FRAX Price: ~$1.00 (±$0.002 variance)
  • KRWQ Price: ~$0.00072 (with intentional variance to trigger BUY opportunities)
  • Spread Calculation: ((KRWQ - impliedKRWQ) / impliedKRWQ) * 100
  • Transaction Delay: 1.5 seconds to simulate real blockchain latency

🎨 Demo Features

Visual Elements

  • ✅ Professional ASCII header banner
  • 📊 Color-coded spread indicators (Green/Yellow/Red)
  • 🔄 Loading spinners for async operations
  • 🤖 Chain of thought reasoning display
  • 💱 Real-time market rate updates

Agent Logic

  • Analyzes liquidity pools across both chains
  • Calculates arbitrage opportunities
  • Estimates profit potential
  • Shows confidence levels (0-100%)

🔧 Configuration

Edit .env file for custom settings (currently uses mock data only).


📝 License

MIT


🏆 Hackathon Notes

This demo is designed to showcase:

  • ADK-TS design patterns
  • Autonomous agent decision-making
  • Cross-chain arbitrage concepts
  • Professional terminal UI/UX

Note: All data is mocked. No real API connections or blockchain transactions are made.


Powered by Frax Finance & KRWQ 🚀

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors