Smart Contract

Smart contracts can autonomously perform all or part of the contract-related operations and generate corresponding verifiable evidence to illustrate the effectiveness of performing contract operations. For example, a smart contract on Ethereum is a piece of code that can be executed by the Ethereum virtual machine.

Smart contracts exist on various nodes of the blockchain network in the form of on-chain scripts, and their security and costs have attracted much attention. 

Code Reuse

Smart contracts exist on various nodes of the blockchain network in the form of on-chain scripts, and their security and costs have attracted much attention. At the same time, with the increasing number of smart contracts, it becomes possible to reuse existing smart contracts.. The goal of this sub-project is to obtain “differentiated code” from the comparison of similar smart contracts, and use the “differentiated code” to support smart contract update.

Recommending Differentiated Code to Support Smart Contract Update


A smart contract is a program that runs on the blockchain, and there is evidence that most of the smart contracts on the Ethereum are highly similar, as they share lots of repetitive code. In this study, we empirically study the repetitiveness of the smart contracts via cluster analysis and try to extract the differentiated code from the similar contracts. Differentiated code is defined as the source code except the repeated ones in two similar smart contracts, which usually illustrates how a software feature is implemented or a programming issue is solved. Then, differentiated code might be used to guide the update of a smart contract in its next version. In this paper, to support the update of a target smart contract, we apply syntax and semantic similarities to discover its similar smart contracts from more than 120,000 smart contracts, and recommend the differentiated code to the target smart contract. The promising experimental results demonstrated the differentiated code can effectively support smart contract update.

Overall framework of the smart contract update supporting

If you want to cite this paper, please use the following reference:

  title={Recommending differentiated code to support smart contract update},
  author={Huang, Yuan and Kong, Queping and Jia, Nan and Chen, Xiangping and Zheng, Zibin},
  booktitle={Proceedings of the 27th International Conference on Program Comprehension},
  organization={IEEE Press}

Smart Contract Recommendation

Smart contracts have increasingly been created and run on Blockchain platforms since the development of Blockchain 2.0. As smart contracts are usually programs written in high-level languages, such as Solidity and Serpent, the creators of smart contracts require a certain knowledge of programming. Moreover, smart contracts also require regarded some human inputs and controls, such as Gas setting, even though they are regarded as automatable and enforceable agreements. As a result, An exploration of smart contract recommendation is proposed for more efficient creation of smart contracts. It is supposed that recommending contract files to creators based on the historical data of smart contracts from different creators on a Blockchain platform would be contribute to reduce programming difficulty, code vulnerabilities and computation resource.

Exploring Smart Contract Recommendation: Towards High-efficiency Blockchain Development


We proposed a smart contract recommendation framework to explore and validate the feasibility of smart contract recommendation. Based on the real-world data collected from two well-known blockchain platforms, Ethereum and EOS, we first create two datasets for evaluating our smart contract recommendation framework. The two datasets can be provided to others for further researches on contract recommendation. Then several classical recommendation algorithms are applied to the datasets after data preprocessing. Finally, according to the comparison results on two datasets with various experimental settings, we prove that smart contract recommendation is feasible and can assist blockchain users to develop smart contracts in a more efficient way.