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

Introduction

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

Citation

BibTeX

@inproceedings{huang2019recommending,
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},
pages={260--270},
year={2019},
organization={IEEE Press}
}

IEEE

Y. Huang, Q. Kong, N. Jia, X. Chen and Z. Zheng, "Recommending Differentiated Code to Support Smart Contract Update," 2019 IEEE/ACM 27th International Conference on Program Comprehension (ICPC), Montreal, QC, Canada, 2019, pp. 260-270.

ACM

Yuan Huang, Queping Kong, Nan Jia, Xiangping Chen, and Zibin Zheng. 2019. Recommending differentiated code to support smart contract update. In Proceedings of the 27th International Conference on Program Comprehension (ICPC ’19). IEEE Press, 260–270. DOI:https://doi.org/10.1109/ICPC.2019.00045