Low-level Comments auto-generation for Solidity Smart Contracts
Chaochen Shi, Yong Xiang, Jiangshan Yu, Keshav Sood, Longxiang Gao

TL;DR
This paper introduces SolcTrans, an automated tool that translates Solidity smart contract code into natural language descriptions, aiding understanding and reducing security risks for non-programmers.
Contribution
It presents a novel translation method based on abstract syntax trees and formal grammar, achieving performance comparable to state-of-the-art models with limited data.
Findings
SolcTrans performs well with small datasets.
It maintains accuracy across different code lengths.
The tool effectively interprets Solidity code into English.
Abstract
Context: Decentralized applications on blockchain platforms are realized through smart contracts. However, participants who lack programming knowledge often have difficulties reading the smart contract source codes, which leads to potential security risks and barriers to participation. Objective: Our objective is to translate the smart contract source codes into natural language descriptions to help people better understand, operate, and learn smart contracts. Method: This paper proposes an automated translation tool for Solidity smart contracts, termed SolcTrans, based on an abstract syntax tree and formal grammar. We have investigated 3,000 smart contracts and determined the part of speeches of corresponding blockchain terms. Among them, we further filtered out contract snippets without detailed comments and left 811 snippets to evaluate the translation quality of SolcTrans. Results:…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsBlockchain Technology Applications and Security · FinTech, Crowdfunding, Digital Finance
