DOI: 10.6084/m9.figshare.25715565.v1
title: HCC Evaluation Dataset and Results

description: This archive contains the evaluation data we produced during the evaluation of our prototype implementation of HCC from our paper <i>HCC: A Language-Independent Hardening Contract Compiler for Smart Contracts</i>.OverviewThis dataset is structured as follows:Experiment DataThe directory <code>experiments</code> contains a subdirectory for each experiment, i.e., <code>correctness</code>, <code>effectiveness</code> and <code>practicality</code>, as well as a directory called <code>original_traces</code> which contains replay traces of original on-chain transactions. Subdirectories for each experiment contain all data we used or produced in the respective experiment.The subdirectory for each experiment contains the original contracts, the patched contracts as well as logs and compressed traces (except practicality, see below) in subdirectories named accordingly.Note that we split data from our effectiveness experiment into <code>integer_bugs</code> and <code>reentrancy</code> subdirectories to facilitate separate evaluation of the results.During the practicality experiment, we do not replay any transactions, but we ran a comparison between HCC and sGuard<sup>1</sup>. Hence, the <code>practicality</code> subdirectory contains no traces, but instead two distinct <code>log</code> file and <code>patched</code> contract directories in the <code>HCC</code> and <code>sGuard</code> subdirectories each.Hardware RequirementsTo unzip the archive, around 20 GB of free disk space are necessary. Apart from that, we recommend 16 GB of RAM when using the <i>report script</i>.Report ScriptOn the top-level directory you find a <code>report.py</code> file, which is an executable Python script. The only requirement for running this script is a Python 3.6+ interpreter as well as an installation of the <code>numpy</code> package. Usage:<br><b>Usage:</b> <code>./report.py</code>, i.e.:<code>./report.py integer_bugs</code><code>./report.py reentrancy</code><code>./report.py correctness</code><code>./report.py</code> <code>0x3d4530082c3eb60f58af03f79b1ed3f40e591cd1</code>You can run the script for each contract individually by providing the address, or for a whole experiment (see above). As an address, you may use any filename from any <code>contracts</code> folder <b>without</b> the <code>.sol</code> file extension. To see data for the integer bug effectiveness as discussed in the paper, run <code>./report.py integer_bugs</code>.The script will create reports with information about each contract it analyzes in the (automatically created) top-level directory <code>reports</code>. The report contains information about gas overhead and transaction execution.Note that, depending on the experiment, the script may take several minutes to execute on common hardware.The HCC PaperWe describe HCC's concept, architecture, implementation and evaluation results in our paper (Arxiv Preprint), which will be published at ACNS in June 2025.Until then, you may cite this work as follows:<code></code><code>@misc{hcc2024preprint,</code> <code>title={HCC: A Language-Independent Hardening Contract Compiler for Smart Contracts},</code> <code>author={Jens-Rene Giesen and Sebastien Andreina and Michael Rodler and Ghassan O. Karame and Lucas Davi},</code> <code>year={2024},</code> <code>eprint={2203.00364},</code> <code>archivePrefix={arXiv},</code> <code>primaryClass={cs.CR},</code> <code>url={https://arxiv.org/abs/2203.00364},</code> <code>}</code>```<sup>1 </sup>Nguyen, Tai D., Long H. Pham, and Jun Sun. 2021. “SGUARD: Towards Fixing Vulnerable Smart Contracts Automatically.” In 2021 IEEE Symposium on Security and Privacy (SP), 1215–29.