REVIEW 4 major objections 5 minor 20 references
ContractTrace: Retracing Smart Contract Versions for Security Analyses
T0 review · 4 major / 5 minor · reviewed 2026-08-10 · deepseek-v4-flash
Pith's one-line read Smart-contract version histories can be traced from proxy delegatecall records, enabling vulnerability lifecycle analysis.
desk verdict A genuinely useful open dataset for smart contract lineages, but the accuracy claim needs independent validation before lineageSet can be treated as ground truth. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The central mechanism is the proxy pattern and its delegatecall instruction: a proxy holds a configurable address and forwards calls to that address while executing them in the proxy's own storage context, so every change of the callee address is a version change of the same logical contract. ContractTrace treats the sequence of callee addresses $\Sigma = S_1 S_2 \cdots S_n$ for a unique proxy as a lineage, and defines the predecessor/successor pair as adjacent elements $S_{i-1}$ and $S_i$. The pipeline finds proxies by the keccak-256 signature of the upgrade function, extracts delegatecall timestamps from on-chain data, and enforces chronological, non-overlapping activity periods (Rule 3) so that each lineage is a linear chain rather than a tree. This design is what converts ordinary transaction history into a version lineage suitable for vulnerability-lifecycle analysis.
What would settle it
Check a sample of lineageSet against on-chain admin-upgrade events and proxy storage slots: if a delegatecall target appears in the lineage but was never announced as an upgrade by the proxy's own events, or if two lineage members have overlapping delegatecall activity while user transactions continue, then the linear-version assumption fails and the lineage contains a false or missing version. Concretely, replay the delegatecall logs for one proxy and compare each callee's activity interval to the timestamps in the proxy's upgrade events; any mismatch would show that delegatecall history alone is not a faithful version history.
Extended reading notes
Core claim
The paper's central claim is that proxy-based upgrade records, not code similarity, are the trustworthy signal for linking smart-contract versions. Because a proxy executes its logic in the context of a configurable callee address, the on-chain history of delegatecall targets from that proxy identifies the successive implementations of the same logical contract. ContractTrace automates this by locating proxies through the keccak-256 signature of the upgrade function in BigQuery, querying Etherscan for callee source code, and applying three rules: every lineage member must be a callee of the same proxy, a lineage has at least two versions, and versions' delegatecall activity periods are chronological and non-overlapping. Running this pipeline produced lineageSet, and testing the same lineages against the LSH-based similarity engine shows that similarity-based methods achieve high precision only at thresholds so strict that recall falls below 7%, so the conservative proxy-based method is offered as a ground-truth benchmark for future lineage construction.
Load-bearing premise
The load-bearing assumption is that every contract address a proxy forwards to is a genuine new version of the same logical contract and that those versions' active periods never overlap; a proxy that forwards to a library, router, or temporary helper would be silently recorded as a version, and simultaneously active valid versions would be dropped.
Editorial extensions
If this is right
- Security researchers can use lineageSet instead of Etherscan's flat contract list to compute how long a vulnerability survives: the paper measures an average of 283 days before a vulnerability disappears without a new one appearing.
- Automated program repair for Ethereum can target the versions where vulnerabilities persist, and the dataset can be rerun periodically to capture newly deployed versions.
- Similarity-based lineage construction, as implemented by LSH, should be revalidated against lineageSet before being used to answer evolution questions, since even at the low-similarity threshold recall is under 16%.
- The vulnerability case study's method can be extended to other properties, such as defects, gas consumption, and access-control changes, because the lineage file and function pairing supports comparison at contract, file, and function granularity.
- Because lineageSet is openly available, future lineage-construction methods can be benchmarked against a common ground truth instead of non-shared private datasets.
Reading between the lines
- If the delegatecall assumption is relaxed, the same infrastructure could be extended to other proxy standards, such as EIP-1967 storage slots or transparent proxies, by reading their upgrade events, potentially more than tripling the observed 347-lineage coverage.
- The 15.8% maximum recall of LSH should not be read as the ceiling of similarity-based methods; a fair benchmark would restrict both methods to the same proxy-upgraded population, since lineageSet contains only proxy-backed contracts by construction.
- A direct falsification test would compare each lineage's delegatecall timeline against the proxy's own emitted upgrade events, such as Upgraded(address); any timeline that includes a callee never announced as an upgrade is a false version.
- The reported newly introduced vulnerability rate of 49.19% is a union of three detectors, so it likely overstates true new defects; the dataset enables a sensitivity analysis using intersection or majority voting without re-collecting lineages.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes ContractTrace, an automated infrastructure that constructs smart-contract lineages from Ethereum proxy contracts by collecting delegatecall callees and ordering them chronologically (Rules 1–3, Section V-A). The resulting dataset, lineageSet, contains 1,055 contracts grouped into 347 lineages. The authors demonstrate the dataset on a vulnerability-lifecycle case study (Section VI) and evaluate a similarity-based lineage-construction approach (LSH) against lineageSet as ground truth (Section VII), reporting low precision and recall for LSH and concluding that the proxy-based method is superior. The paper frames its contribution as an open, reproducible dataset and infrastructure for studying smart-contract evolution and security.
Significance. If the lineage construction is accurate, lineageSet would be a valuable community resource: it is open, automatically built, and larger than prior lineage datasets, which has been a recognized gap in empirical smart-contract research. The paper also ships a case study that connects lineage information to vulnerability lifecycles, a security-relevant analysis that is otherwise difficult to perform. The LSH evaluation, while problematic as currently designed, addresses a real question about the reliability of similarity-based lineage construction. The authors should be credited for making the dataset and code publicly available and for being transparent about some design choices in Section IX. However, the central claim of accuracy is not yet established: the proxy-callee assumption, the linear-ordering rule, and the ground-truth validation all need stronger support before the dataset can be used as a benchmark.
major comments (4)
- [Section V-A, Step 2 (Rule 3)] Rule 1 equates every delegatecall callee of a proxy with a successive version of the same logical contract. Delegatecall is a general EVM primitive: proxies may forward to libraries, routers, or temporarily used addresses for reasons unrelated to version upgrades. The paper provides no independent verification (e.g., manual inspection, project release histories, admin logs, or cross-referencing with verified source-code naming conventions) that the 1,055 collected callees are actual implementations of the same logical contract. Without such verification, the precision of lineageSet is unproven, and the ground-truth status claimed in Section VII is not established. Please provide a quantitative validation on a random sample of lineages, with a concrete protocol for distinguishing genuine versions from unrelated callees.
- [Section VII and Table II] Rule 3 forces a linear, non-overlapping ordering of versions within a lineage. As acknowledged in Section IX, this may exclude valid overlapping or branched deployments, but the paper does not quantify how often this occurs or how it affects the downstream vulnerability-lifecycle results in Section VI. Please report the number of callees or proxy-to-callee relationships that were discarded because of overlap or branching, and provide a sensitivity analysis showing how the size and composition of lineageSet change when Rule 3 is relaxed (e.g., allowing overlapping activity with ordering by first delegatecall).
- [Section VII, Methodology step (c)] The Key Insight box states that the conservative proxy-based approach has 'significantly higher precision and recall' than LSH, but Table II reports precision and recall only for the LSH-based method. No precision or recall is computed for ContractTrace itself. To support the comparative claim, the authors must compute analogous precision and recall for ContractTrace—ideally against an externally validated ground truth or at least against a manually verified subset—and report the comparison in the same table.
- [Section V-A, Step 1 (data collection)] The evaluation uses lineageSet as the ground truth for measuring LSH precision and recall, but lineageSet is produced by the very method being promoted. This is circular: any systematic bias in ContractTrace (e.g., false inclusions from Rule 1 or false exclusions from Rule 3) is inherited by the ground truth and propagates into the LSH evaluation. Please add an independent ground truth for at least a stratified random sample of lineages, and report the agreement between ContractTrace and that independent ground truth (e.g., Cohen's kappa or a confusion matrix at the pair or lineage level).
minor comments (5)
- [Table I] Table I reports 706 predecessor/successor pairs, but the arithmetic from the stated lineage counts (1,055 contracts minus 347 lineages, each lineage of size n contributing n-1 pairs) yields 708 pairs. Please reconcile this discrepancy or correct the table.
- [Section VI] The filename similarity threshold of 'two-character difference' is an ad-hoc free parameter. Please state explicitly how this threshold was chosen and provide the sensitivity of the resulting file-pair statistics (e.g., the 98% average similarity) to this parameter.
- [Section VI] The vulnerability-lifecycle case study reports percentages (e.g., 49.19% newly introduced, 21.53% disappeared) but does not state the number of vulnerabilities these correspond to or how the union/intersection of tools was exactly combined. Please clarify the denominator and the tool-combination procedure to make the numbers reproducible.
- [Section V-B] The description of LSH as implemented in Etherscan is brief and does not specify what exactly is fingerprinted (bytecode, source code, or metadata) or how the low/medium/high thresholds are defined. Without this, the interpretability of Table II is limited. Please provide a reference to the LSH implementation or a precise specification.
- [Section V-B] The caption of Figure 2 is incomplete ('Sizes of lineages in lineageSet' is followed by a fragment). Please revise the caption and ensure all figures are referenced in the text with the correct number (the text appears to reference Figure 1 from another work in Section II-B but does not clearly label it).
Circularity Check
Evaluation is self-referential: lineageSet is both ContractTrace's output and the ground truth used to confirm its accuracy, so the 'higher precision and recall' claim for the proxy-based approach is true by construction.
-
self definitional
[Section VII (Evaluation methodology), citing lineages produced in Section V-B]
"Ground Truth Lineages Data : lineageSet is used as the benchmark for evaluating the performance of the LSH-based method. ... we leverage lineageSet, built conservatively, as a ground truth dataset."
lineageSet is produced by ContractTrace in Section V-B ('Following the implementation and execution of the two-step process outlined above, we obtain lineageSet'). Using that same artifact as ground truth to 'validated our lineage detection methodology' (abstract) means the evaluation compares LSH against ContractTrace's own output, not against an independent oracle. Because Rule 1 defines every delegatecall callee of a proxy as a lineage member and Rule 3 forces a linear chronology, lineageSet cannot falsify the core assumption that delegatecall callees are true contract versions. The claimed confirmation of accuracy is therefore circular with respect to the tool's construction rules.
-
other
[Section VII, 'Key Insight' box]
"Low Recall Across All Scenarios: Similarity-based approach to building lineages for smart contracts leads to low recall. When considering all contracts in Ethereum, the conservative proxy-based approach used to build lineageSet has a significantly higher precision and recall."
No precision or recall is computed for the proxy-based approach in Table II; only LSH precision and recall are reported. Since lineageSet serves as the ground-truth benchmark and is itself built by the proxy-based approach, the proxy-based approach's precision and recall against that benchmark are 100% by construction. The 'Key Insight' therefore does not empirically establish that ContractTrace outperforms LSH in accuracy; it restates that the benchmark was generated by the method being promoted. The abstract's claim of 'confirming the security relevance and accuracy of our technique' is not supported by an independent measurement.
full rationale
The construction of lineageSet itself is not definitionally circular in a harmful way: it is grounded in observable on-chain proxy delegatecall events, which is an external data source, and the paper makes its classification rules explicit. The circularity arises in the evaluation layer. lineageSet is both the output of ContractTrace and the ground truth against which the alternative LSH approach is measured, so the evaluation can only measure how well LSH agrees with ContractTrace's own labeling decisions. The paper does not independently verify that every delegatecall callee is a genuine version (libraries, routers, and temporary callees could be mislabeled under Rule 1), and the authors acknowledge in Section IX that Rule 3 may exclude legitimate overlapping versions. These threats mean the reported LSH precision/recall numbers are relative to an unvalidated benchmark, and the 'Key Insight' that the proxy-based approach has higher precision and recall is true by construction rather than by measurement. This warrants a moderate circularity score, but not a high one, because the dataset is openly available, the pipeline is transparent, and the limitation is at least partially acknowledged.
Assumptions & free parameters
free parameters (2)
- filename matching threshold =
two-character difference
- minimum lineage size =
2 versions
assumptions (4)
- domain assumption Etherscan source verification guarantees that submitted source code matches deployed bytecode at the given address.
- ad hoc to paper Every delegatecall target of a proxy is a successive version of the same logical contract, with no unrelated callees.
- ad hoc to paper Contract versions in a lineage are linearly ordered with no overlapping activity periods.
- domain assumption BigQuery and Etherscan provide complete and current enumeration of proxy and upgrade transactions.
Cite this review
Pith. "Pith review of ContractTrace: Retracing Smart Contract Versions for Security Analyses." pith.science (2026). https://pith.science/paper/UFYETCYS
@misc{pith2026241220866,
author = {Pith},
title = {Pith review of: ContractTrace: Retracing Smart Contract Versions for Security Analyses},
year = {2026},
howpublished = {\url{https://pith.science/paper/UFYETCYS}},
note = {Machine review of arXiv:2412.20866}
}
read the original abstract
Due to the inherent immutability of blockchain technology, smart contract updates require their deployment at new addresses rather than modifying existing ones, thus fragmenting version histories and creating critical blind spots for analyses. Indeed, for example, this fragmentation severely hinders security researchers ability to track vulnerability lifecycles across contract versions. While platforms like Etherscan provide detailed information about Ethereum smart contracts, they lack crucial functionality to trace predecessor-successor relationships within smart contract lineages, preventing systematic analysis of how vulnerabilities emerge, propagate, and potentially remain unresolved across versions.To address the challenge of tracing smart contract lineages, we adopt a Design Science Research (DSR) approach and introduce ContractTrace, an automated infrastructure that accurately identifies and links versions of smart contracts into coherent lineages. This tool enables the construction of lineageSet, an up-to-date, open-source dataset specifically designed to support security research on vulnerability, defect or any other property evolution patterns in smart contracts. Through a security-focused case study we demonstrate how ContractTrace reveals previously obscured vulnerability life-cycles within smart contract lineages, tracking whether critical security flaws persist or get resolved across versions. This capability is essential for understanding vulnerability propagation patterns and evaluating the effectiveness of security patches in blockchain environments. In the evaluation phase of our DSR approach, we validated our lineage detection methodology against an alternative approach using Locality-Sensitive Hashing (LSH) to cluster contract versions, confirming the security relevance and accuracy of our technique.
Figures
Reference graph
Works this paper leans on
-
[1]
Why do smart contracts self-destruct? investigating the selfdestruct function on ethereum,
J. Chen, X. Xia, D. Lo, and J. Grundy, “Why do smart contracts self-destruct? investigating the selfdestruct function on ethereum,” ACM Transactions on Software Engineering and Methodology (TOSEM), vol. 31, no. 2, pp. 1–37, 2021
work page 2021
-
[2]
Recom- mending differentiated code to support smart contract update,
Y . Huang, Q. Kong, N. Jia, X. Chen, and Z. Zheng, “Recom- mending differentiated code to support smart contract update,” in 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC). IEEE, 2019, pp. 260–270
work page 2019
-
[3]
Characterizing code clones in the ethereum smart contract ecosystem,
N. He, L. Wu, H. Wang, Y . Guo, and X. Jiang, “Characterizing code clones in the ethereum smart contract ecosystem,” in Financial Cryptography and Data Security: 24th International Conference, FC 2020, Kota Kinabalu, Malaysia, February 10– 14, 2020 Revised Selected Papers 24 . Springer, 2020, pp. 654– 675
work page 2020
-
[4]
An organized repos- itory of ethereum smart contracts’ source codes and metrics,
G. A. Pierro, R. Tonelli, and M. Marchesi, “An organized repos- itory of ethereum smart contracts’ source codes and metrics,” Future internet, vol. 12, no. 11, p. 197, 2020
work page 2020
-
[5]
Formalizing and securing relationships on public networks,
N. Szabo, “Formalizing and securing relationships on public networks,” First monday, 1997
work page 1997
-
[6]
Bitcoin: A peer-to-peer electronic cash system,
S. Nakamoto, “Bitcoin: A peer-to-peer electronic cash system,” Decentralized Business Review , p. 21260, 2008
work page 2008
-
[7]
A next-generation smart contract and decen- tralized application platform,
V . Buterin et al., “A next-generation smart contract and decen- tralized application platform,” white paper , vol. 3, no. 37, pp. 2–1, 2014
work page 2014
-
[8]
J. Chen, X. Xia, D. Lo, J. Grundy, and X. Yang, “Maintenance- related concerns for post-deployed ethereum smart contract de- velopment: issues, techniques, and future challenges,” Empirical Software Engineering, vol. 26, no. 6, p. 117, 2021
work page 2021
Show all 20 references
-
[9]
Smartembed: A tool for clone and bug detection in smart contracts through structural code embedding,
Z. Gao, V . Jayasundara, L. Jiang, X. Xia, D. Lo, and J. Grundy, “Smartembed: A tool for clone and bug detection in smart contracts through structural code embedding,” in 2019 IEEE In- ternational Conference on Software Maintenance and Evolution (ICSME). IEEE, 2019, pp. 394–397
2019
-
[10]
Deckard: Scalable and accurate tree-based detection of code clones,
L. Jiang, G. Misherghi, Z. Su, and S. Glondu, “Deckard: Scalable and accurate tree-based detection of code clones,” in 29th International Conference on Software Engineering (ICSE’07) . IEEE, 2007, pp. 96–105
2007
-
[11]
Nicad: Accurate detection of near- miss intentional clones using flexible pretty-printing and code normalization,
C. K. Roy and J. R. Cordy, “Nicad: Accurate detection of near- miss intentional clones using flexible pretty-printing and code normalization,” in 2008 16th iEEE international conference on program comprehension. IEEE, 2008, pp. 172–181
2008
-
[12]
Similarity search in high dimensions via hashing,
A. Gionis, P. Indyk, R. Motwani et al. , “Similarity search in high dimensions via hashing,” in Vldb, vol. 99, no. 6, 1999, pp. 518–529
1999
-
[13]
An empirical study on real bug fixes from solidity smart contract projects,
Y . Wang, X. Chen, Y . Huang, H.-N. Zhu, J. Bian, and Z. Zheng, “An empirical study on real bug fixes from solidity smart contract projects,” Journal of Systems and Software , vol. 204, p. 111787, 2023
2023
-
[14]
Slither: a static analysis framework for smart contracts,
J. Feist, G. Grieco, and A. Groce, “Slither: a static analysis framework for smart contracts,” in 2019 IEEE/ACM 2nd Inter- national Workshop on Emerging Trends in Software Engineering for Blockchain (WETSEB) . IEEE, 2019, pp. 8–15
2019
-
[15]
https://github.com/ConsenSys/mythril
-
[16]
https://github.com/nveloso/conkas
-
[17]
Empirical review of automated analysis tools on 47,587 ethereum smart contracts,
T. Durieux, J. F. Ferreira, R. Abreu, and P. Cruz, “Empirical review of automated analysis tools on 47,587 ethereum smart contracts,” in Proceedings of the ACM/IEEE 42nd International conference on software engineering , 2020, pp. 530–541
2020
-
[18]
Megadiff: A dataset of 600k java source code changes categorized by diff size,
M. Monperrus, M. Martinez, H. Ye, F. Madeiral, T. Durieux, and Z. Yu, “Megadiff: A dataset of 600k java source code changes categorized by diff size,” arXiv preprint arXiv:2108.04631 , 2021
2021 arXiv
-
[19]
Improving the precision of automatic program repair with machine learning,
H. Ye, “Improving the precision of automatic program repair with machine learning,” Ph.D. dissertation, KTH Royal Institute of Technology, 2023
2023
-
[20]
Ac/c++ code vulnerability dataset with code changes and cve summaries,
J. Fan, Y . Li, S. Wang, and T. N. Nguyen, “Ac/c++ code vulnerability dataset with code changes and cve summaries,” in Proceedings of the 17th International Conference on Mining Software Repositories, 2020, pp. 508–512
2020
Reviewed August 10, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.