This tool visualizes crvUSD LLAMMA pool's arbitraging process and conducts statistical analysis.
- Install
poetry install
- Generate arbitrage tokenflow chart by transacation hash (dot file and png file)
poetry shell
python crvusd_arbitrage_analytics/tokenflow.py 0x0806a484daf46bf1948185fac7f13613268da0969d638bc87dc934eefeab6b13
Fetch all arbitrage data and automatically classify, statistics, and generate tokenflow chart.
- Fetch all arbitrage transacation data, and collateral price data, save raw data in
data/original
- 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
- Classify all arbitrage tokenflow
- Generate statistical graphs
- 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
Some statistical graphs and token flow charts (statistics date: 2023-08-09):
The three most frequently used arbitrage methods:
The three most frequently used arbitrage methods:
The three most frequently used arbitrage methods:
The three most frequently used arbitrage methods:
More data and picture results can be seen in results folder.