Skip to content

Repository files navigation

Cryptocurrency Arbitrage Visualization System

This project provides a visual interface for detecting and analyzing arbitrage opportunities in cryptocurrency markets.

Features

  • Token network graph visualization
  • Arbitrage path visualization
  • Profit calculation based on initial capital
  • Interactive UI for exploring different tokens and opportunities

Setup Instructions

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)

Installation

  1. Clone the repository or download the source code

  2. Create a virtual environment (recommended): ``` python -m venv venv ```

  3. Activate the virtual environment:

    • On Windows: ``` venv\Scripts\activate ```
    • On macOS/Linux: ``` source venv/bin/activate ```
  4. Install the required dependencies: ``` pip install -r requirements.txt ```

  5. Make sure the .env file is in the root directory with your Alchemy API keys: ``` ALCHEMY_ETHEREUM_KEY=https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY ALCHEMY_BSC_KEY=https://bnb-mainnet.g.alchemy.com/v2/YOUR_KEY ALCHEMY_URL=https://eth-mainnet.g.alchemy.com/v2/YOUR_KEY ```

Running the Application

  1. Start the Flask server: ``` python app.py ```

  2. Open your web browser and navigate to: ``` http://127.0.0.1:5000 ```

  3. Use the interface to:

    • Select a source token from the dropdown
    • Enter your initial capital amount
    • Click "Find Arbitrage Opportunities" to analyze
    • View the results in the various visualization panels

Using the Application

  1. Token Selection: Choose a token from the dropdown menu to use as your starting point for arbitrage.

  2. Initial Capital: Enter the amount of capital you want to simulate for the arbitrage.

  3. Network Graph: The network graph shows all tokens and their connections. When you find arbitrage opportunities, the relevant path will be highlighted.

  4. Path Visualization: Shows the specific path of tokens for an arbitrage opportunity.

  5. Profit Calculation: Displays a chart comparing initial capital, final capital, and profit for each opportunity.

Notes

  • This application uses sample pool data by default. To use real-time data, you would need to uncomment and configure the relevant sections in the code that fetch data from blockchain networks.
  • The fee parameter in the arbitrage detection algorithm is set to 0.3% by default, which is typical for many DEXes.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages