Checking Smart Contracts with Structural Code Embedding
Not on the map. Why?
Abstract (arXiv)
Smart contracts have been increasingly used together with blockchains to automate financial and business transactions. However, many bugs and vulnerabilities have been identified in many contracts which raises serious concerns about smart contract security, not to mention that the blockchain systems on which the smart contracts are built can be buggy. Thus, there is a significant need to better maintain smart contract code and ensure its high reliability. In this paper, we propose an automated approach to learn characteristics of smart contracts in Solidity, which is useful for clone detection, bug detection and contract validation on smart contracts. Our new approach is based on word embeddings and vector space comparison. We parse smart contract code into word streams with code structural information, convert code elements (e.g., statements, functions) into numerical vectors that are supposed to encode the code syntax and semantics, and compare the similarities among the vectors encoding code and known bugs, to identify potential issues. We have implemented the approach in a prototype, named SmartEmbed. Results show that our tool can effectively identify many repetitive instances of Solidity code, where the clone ratio is around 90%. Code clones such as type-III or even type-IV semantic clones can also be detected accurately. Our tool can identify more than 1000 clone related bugs based on our bug databases efficiently and accurately. Our tool can also help to efficiently validate any given smart contract against a known set of bugs, which can help to improve the users' confidence in the reliability of the contract. The anonymous replication packages can be accessed at: https://drive.google.com/file/d/1kauLT3y2IiHPkUlVx4FSTda-dVAyL4za/view?usp=sharing, and evaluated it with more than 22,000 smart contracts collected from the Ethereum blockchain.
Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). First posted on arXiv 20 Jan 2020.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 2; 2022: 1; 2023: 2; 2024: 1; 2025: 3; 2026: 1.
10 papers.
- 2021Eth2Vec: Learning Contract-Wide Code Representations for Vulnerability Detection on Ethereum Smart Contractscited by 7
- 2022MANDO: Multi-Level Heterogeneous Graph Embeddings for Fine-Grained Detection of Smart Contract Vulnerabilitiescited by 4
- 2023HyMo: Vulnerability Detection in Smart Contracts using a Novel Multi-Modal Hybrid Modelcited by 2
- 2024Blockchain Meets LLMs: A Living Survey on Bidirectional Integrationcited by 2
- 2025CodeBC: A More Secure Large Language Model for Smart Contract Code Generation in Blockchaincited by 2
- 2021Old but Gold: Reconsidering the value of feedforward learners for software analyticscited by 1
- 2025UEChecker: Detecting Unchecked External Call Vulnerabilities in DApps via Graph Analysiscited by 1
- 2023MindTheDApp: A Toolchain for Complex Network-Driven Structural Analysis of Ethereum-based Decentralised Applicationscited by 0
- 2025Towards Understanding Deep Learning Model in Image Recognition via Coverage Testcited by 0
- 2026Repository-Level Solidity Code Generation with Large Language Models: From Prompting to Fine-Tuningcited by 0
- 2026Repository-Level Solidity Code Generation with Large Language Models: From Prompting to Fine-Tuning18 Jun 2026
- 2025UEChecker: Detecting Unchecked External Call Vulnerabilities in DApps via Graph Analysis2 Aug 2025
- 2025Towards Understanding Deep Learning Model in Image Recognition via Coverage Test12 May 2025
- 2025CodeBC: A More Secure Large Language Model for Smart Contract Code Generation in Blockchain28 Apr 2025
- 2024Blockchain Meets LLMs: A Living Survey on Bidirectional Integration25 Nov 2024
- 2023MindTheDApp: A Toolchain for Complex Network-Driven Structural Analysis of Ethereum-based Decentralised Applications3 Oct 2023
- 2023HyMo: Vulnerability Detection in Smart Contracts using a Novel Multi-Modal Hybrid Model25 Apr 2023
- 2022MANDO: Multi-Level Heterogeneous Graph Embeddings for Fine-Grained Detection of Smart Contract Vulnerabilities28 Aug 2022
- 2021Old but Gold: Reconsidering the value of feedforward learners for software analytics15 Jan 2021
- 2021Eth2Vec: Learning Contract-Wide Code Representations for Vulnerability Detection on Ethereum Smart Contracts7 Jan 2021