Smart contracts are programs that are used for verifying and enforcing the terms of an agreement. Ethereum is an extensively used platform that can be used to execute smart contracts. These can be defined by using high-level languages such as Solidity, Vyper and Bamboo that are compiled into low-level machine instructions, i.e., bytecode. These instructions define a Turing complete language and are often represented by using a read- able format that is referred to as opcodes. Here, we present a novel, more comprehensive, study that aims at gaining a precise understanding on how programmers use the linguistic instructions supported by Ethereum. More precisely, the contracts’ source code has been also analysed, in order to understand the high-level control structures and core instructions that are used for smart contract definitions, and how they are reflected on the op- code level. We have gathered ten of thousands of verified Ethereum smart contracts that have been written by using the Solidity language. This study can lay the groundwork for defining new formalisms and new domain specific languages (DSL). These can support the users in the development of decentralised applications (DAPPs).
Ethereum smart contracts: Analysis and statistics of their source code and opcodes
Stefano Bistarelli;Leonardo Mostarda;
2020
Abstract
Smart contracts are programs that are used for verifying and enforcing the terms of an agreement. Ethereum is an extensively used platform that can be used to execute smart contracts. These can be defined by using high-level languages such as Solidity, Vyper and Bamboo that are compiled into low-level machine instructions, i.e., bytecode. These instructions define a Turing complete language and are often represented by using a read- able format that is referred to as opcodes. Here, we present a novel, more comprehensive, study that aims at gaining a precise understanding on how programmers use the linguistic instructions supported by Ethereum. More precisely, the contracts’ source code has been also analysed, in order to understand the high-level control structures and core instructions that are used for smart contract definitions, and how they are reflected on the op- code level. We have gathered ten of thousands of verified Ethereum smart contracts that have been written by using the Solidity language. This study can lay the groundwork for defining new formalisms and new domain specific languages (DSL). These can support the users in the development of decentralised applications (DAPPs).I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.