• Home
  • Search
  • Automating Comment Generation for Smart Contract from Bytecode
  • Cite Icon8
  • https://doi.org/10.1145/3699597Copy DOI Icon

Automating Comment Generation for Smart Contract from Bytecode

Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

Recently, smart contracts have played a vital role in automatic financial and business transactions. To help end users without programming background to better understand the logic of smart contracts, previous studies have proposed models for automatically translating smart contract source code into their corresponding code summaries. However, in practice, only 13% of smart contracts deployed on the Ethereum blockchain are associated with source code. The practical usage of these existing tools is significantly restricted. Considering that bytecode is always necessary when deploying smart contracts, in this article, we first introduce the task of automatically generating smart contract code summaries from bytecode. We propose a novel approach, named Smart Contract Bytecode Translator ( SmartBT ) for automatically translating smart contract bytecode into fine-grained natural language description directly. Two key challenges are posed for this task: structural code logic hidden in bytecode and the huge semantic gap between bytecode and natural language descriptions. To address the first challenge, we transform bytecode into Control-Flow Graph (CFG) to learn code structural and logic details. Regarding the second challenge, we introduce an information retrieval component to fetch similar comments for filling the semantic gap. Then, the structural input and semantic input are used to build an attentional sequence-to-sequence neural network model. The copy mechanism is employed to copy rare words directly from similar comments, and the coverage mechanism is employed to eliminate repetitive outputs. The automatic evaluation results show that SmartBT outperforms a set of baselines by a large margin, and the human evaluation results show the effectiveness and potential of SmartBT in producing meaningful and accurate comments for smart contract code from bytecode directly.

Similar Papers
  • Research Article
  • Citations155

Checking Smart Contracts With Structural Code Embedding

  • Jan 07, 2021
  • IEEE Transactions on Software Engineering
  • Zhipeng Gao +4
  • PDF
  • Research Article
  • Citations47

An Organized Repository of Ethereum Smart Contracts’ Source Codes and Metrics

  • Nov 15, 2020
  • Future Internet
  • Giuseppe Antonio Pierro +2
  • PDF
  • Research Article

In the webs of ethereum: analyzing smart contracts vulnerabilities

  • Feb 05, 2026
  • International Journal of Information Security
  • Vaios Bolgouras +4
  • Conference Article
  • Citations18

Smart-Graph: Graphical Representations for Smart Contract on the Ethereum Blockchain

  • Mar 01, 2021
  • Giuseppe Antonio Pierro
  • Conference Article
  • Citations17

When deep learning meets smart contracts

  • Dec 21, 2020
  • Zhipeng Gao
  • Conference Article

CASC: Content Addressed Smart Contracts

  • Aug 01, 2022
  • Markus Knecht +1
  • PDF
  • Research Article
  • Citations42

Solidity Code Generation From UML State Machines in Model-Driven Smart Contract Development

  • Jan 01, 2022
  • IEEE Access
  • Mantas Jurgelaitis +2
  • Research Article
  • Citations24

Vulnerable smart contract function locating based on Multi-Relational Nested Graph Convolutional Network

  • Jun 09, 2023
  • Journal of Systems and Software
  • Haiyang Liu +3
  • PDF
  • Research Article
  • Citations10

A Reuse-Oriented Visual Smart Contract Code Generator for Efficient Development of Complex Multi-Party Interaction Scenarios

  • Jul 11, 2023
  • Applied Sciences
  • Xinzhe Shen +4
  • Research Article
  • Citations2

Smart contract optimization for gas fee reduction with static solidity optimizer

  • Aug 05, 2025
  • Discover Applied Sciences
  • Alfred Kuhlman +1
  • Research Article
  • Citations2

Evolution of Smart Contracts- A Bibliometric Analysis and Review

  • Jun 30, 2022
  • International Journal for Research in Applied Science and Engineering Technology
  • Palak Aar
  • Conference Article
  • Citations87

SmartEmbed: A Tool for Clone and Bug Detection in Smart Contracts through Structural Code Embedding

  • Sep 01, 2019
  • Zhipeng Gao +5
  • Conference Article
  • Citations63

Understanding Code Reuse in Smart Contracts

  • Mar 01, 2021
  • Xiangping Chen +4
  • Research Article
  • Citations27

Gas consumption analysis of Ethereum blockchain transactions

  • Nov 03, 2021
  • Concurrency and Computation: Practice and Experience
  • Muhammad Milhan Afzal Khan +2
  • Conference Article
  • Citations17

Analysis of Source Code Duplication in Ethreum Smart Contracts

  • Mar 01, 2021
  • Giuseppe Antonio Pierro +1
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.