- Go 1.19
- Python
pip install loguru pandas gremlinpython tqdm
- Docker
cd graph
makecd graph
docker compose up -d # This will start the tinkerpop server in the backgorundTo stop the server:
cd graph
docker compose downcd graph/trace
unzip txs.zipcd graph
python3 eval/eval_reentrancy.py -d attack -o output/attack_reentrancy.csv # add -p for parallel evaluationIt should correctly identify 1 reentrancy vulnerability in the attack dataset.
cd graph
python3 eval/eval_reentrancy.py -d random -o output/control_reentrancy.csv # add -p for parallel evaluationIt should not identify any reentrancy vulnerability in the control dataset.
cd graph
python3 eval/eval_reentrancy_read.py -d attack -o output/attack_reentrancy_read.csv # add -p for parallel evaluationIt should correctly identify 1 read-only reentrancy vulnerability in the attack dataset.
cd graph
python3 eval/eval_reentrancy_read.py -d random -o output/control_reentrancy_read.csv # add -p for parallel evaluationIt should not identify any read-only reentrancy vulnerability in the control dataset.
cd graph
python3 eval/eval_oracle.py -d attack -o output/attack_price_manipulation.csv # add -p for parallel evaluationIt should correctly identify 1 price manipulation vulnerability in the attack dataset.
cd graph
python3 eval/eval_oracle.py -d random -o output/control_price_manipulation.csv # add -p for parallel evaluationIt should not identify any price manipulation vulnerability in the control dataset.
To run analysis on a custom dataset, fill in transaction hashes in custom.txt (one per line).
Before running the analysis, make sure to generate the trace file for each transaction (See next section).
cd graph
python3 eval/eval_<analysis name>.py -d file -f custom.txt -o output/custom.csv # add -p for parallel evaluation; add -a to mark the dataset as attackTo generate trace file for a transaction, you additionally need to have an Ethereum archive node running (with debug API enabled).
Do not use Erigon archive node as it does not support standard tracing format.
In evaluation we used geth and reth archive node.
cd graph
./build/bin/epg trace --tx <tx hash> --eth-archive-remote <eth archive node url>Full dataset is available at graph/full-dataset in the form of transaction hashes.
If you use Clue in your research, please cite our paper:
Kaihua Qin, Zhe Ye, Zhun Wang, Weilin Li, Liyi Zhou, Chao Zhang, Dawn Song, and Arthur Gervais. 2025.
Enhancing Smart Contract Security Analysis with Execution Property Graphs. Proc. ACM Softw. Eng. 2, ISSTA,
Article ISSTA049 (July 2025), 22 pages. https://doi.org/10.1145/3728924