Skip to content

This code was used to generate results presented in the paper "Detecting Financial Bots on the Ethereum Blockchain".

Notifications You must be signed in to change notification settings

Tommel71/Ethereum-Bot-Detection

Repository files navigation

Ethereum

Bot Detection This code was used to generate results presented in the paper "Detecting Financial Bots on the Ethereum Blockchain".

Bot Image width=

Note that the methods used in this paper are compute intensive for a single PC and require 64GB of RAM. On an AMD Ryzen 5 2600 Six-Core Processor (3.4 GHz) with 64GB of RAM, the code takes about 24 hours to run and in addition to the results produced for the paper, several other tables and figures are generated.

How to install

This repository has only been tested on Windows 10 but may also work on Linux distributions.

To install the required python packages use the following commands

python -m venv .venv
.venv/Scripts/activate source 
pip install requirements.txt

or on Linux (untested)

python -m venv .venv
source .venv/bin/activate
pip install requirements.txt

Minimal Example

Setup

To use this repository block, transaction, and log data (enriched as provided by graphsense-lib) are required

To use it, point PREFIX_DB in configs/test.toml to the folder containing the raw data as demonstrated in a test sample provided in test_data/test_run.

Furthermore, a trace_creations.csv file is required that contains all addresses that should be marked as a smart contract A minimal example is also provided in test_data/codes. Note that the content of the output column is not of central importance. As soon as an address appears in the to_address column, it will be marked as a smart contract.

The data is provided to the program in a compressed format as demonstrated in the minimal example.

Run

To run the code use the following command

python pipeline.py

Tables and figures will be saved in the output folder.

Acknowledgements

We use MEV-inspect https://github.com/flashbots/mev-inspect-py/tree/main/mev_inspect with slightly adapted code to work with data provided by graphsense-lib https://github.com/graphsense/graphsense-lib.

About

This code was used to generate results presented in the paper "Detecting Financial Bots on the Ethereum Blockchain".

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published