Skip to content

ankile/surveillance-metric

Repository files navigation

I See You — Robust Measurement of Adversarial Behavior

This repository contains the code to download the raw blockchain data and run the analysis in the paper "I See You—Robust Measurement of Adversarial Behavior."

Code

This readme assumes that the folder containing the code has been downloaded and unzipped.

Ensure you've avigated into the repo with

cd surveillance-metric

Now, install the required packages to run this code by following the below steps.

Preferably, activate a virtual environment before installing anything, you can use anything, but we'll show it with venv here.

python -m venv venv
source venv/bin/activate

You can alternatively use, e.g., conda if you have that installed

conda create -n defi python=3.11 -y
conda activate defi

Then, install this package and its dependencies

pip install -e .

Download input data data

We have aggregated raw data from different sources to enable the analyses herein, all intended for academic use:

To download all the data used in this study, run the following commands in the root of the repository

curl -O https://surveillance-metric.s3.amazonaws.com/input_data.zip
unzip input_data.zip
rm input_data.zip

You should now have a folder in the root of the project folder called input_data with several more folders inside.

This is the necessary data to run the code that calculates the metric using blockchain data. If you only want to look at the result after running the analyses, rather download the following data.

Calculate the metrics

To run the code that populates the data frames that we later run analyses on, run

python -m surveillance_metric.calculate_surveillance_metric

This assumes the

Download metric calculation output data

To download the output from running the metric calculation scr

curl -O https://surveillance-metric.s3.amazonaws.com/metric_calculation_output.zip
unzip metric_calculation_output.zip
rm metric_calculation_output.zip

Run the analyses on the metrics

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published