GithubHelp home page GithubHelp logo

crvusd-arbitrage-analytics's Introduction

crvUSD Arbitrage Analystics

This tool visualizes crvUSD LLAMMA pool's arbitraging process and conducts statistical analysis.

Getting Started

  • Install
poetry install
  • Generate arbitrage tokenflow chart by transacation hash (dot file and png file)
poetry shell

python crvusd_arbitrage_analytics/tokenflow.py 0x0806a484daf46bf1948185fac7f13613268da0969d638bc87dc934eefeab6b13

Basic Use

Fetch all arbitrage data and automatically classify, statistics, and generate tokenflow chart.

  1. Fetch all arbitrage transacation data, and collateral price data, save raw data in data/original
  2. Wash raw data, save csv file and json file in data/csv/tokenflow_data_[collateral], data/json/tokenflow_data_[collateral]
    • Automatically identify the behavior type of each token transfer
    • Log all swap pools
    • Group all tx steps, e.g. flashswap, sfrxETH stake/unstake, WETH deposit/withdraw, token swap in/out
  3. Classify all arbitrage tokenflow
  4. Generate statistical graphs
  5. Generate tokenflow chart for each arbitrage category
python scripts/0_fetch_data.py
python scripts/1_wash_data.py
python scripts/2_sort_data.py
python scripts/3_draw_graph.py
python scripts/4_statistics_data.py

Results

Some statistical graphs and token flow charts (statistics date: 2023-08-09):

Statistics

Daily revenue and gascost

revenue volume scatter

sfrxETH Dominance

wstETH Dominance

WBTC Dominance

WETH Dominance

Tokenflow

sfrxETH LLAMMA Pool

The three most frequently used arbitrage methods:

wstETH LLAMMA Pool

The three most frequently used arbitrage methods:

WBTC LLAMMA Pool

The three most frequently used arbitrage methods:

WETH LLAMMA Pool

The three most frequently used arbitrage methods:

Daily hard-liquidations

More data and picture results can be seen in results folder.

crvusd-arbitrage-analytics's People

Contributors

0x-stan avatar

Stargazers

 avatar OdinLin avatar  avatar Daniel wu avatar Chan-Ho Suh avatar  avatar linchuan avatar Sandalots avatar sudo rm -rf --no-preserve-root / avatar fiddyresearch avatar

Watchers

Paco avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.