Analysis of Ethereum Smart Contracts and Opcodes

  • Stefano Bistarelli
  • Gianmarco MazzanteEmail author
  • Matteo Micheletti
  • Leonardo Mostarda
  • Francesco Tiezzi
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 926)


Much attention has been paid in recent years to the use of smart contracts. A smart contract is a transaction protocol that executes the terms of an agreement. Ethereum is a widely used platform for executing smart contracts, defined by using a Turing-complete language. Various studies have been performed in order to analyse smart contract data from different perspectives. In our study we gather a wide range of verified smart contracts written by using the Solidity language and we analyse their code. A similar study is carried out on Solidity compilers. The aim of our investigation is the identification of the smart contract functionalities, i.e. opcodes, that play a crucial role in practice, and single out those functionalities that are not practically relevant.


  1. 1.
    Anderson, L., Holz, R., Ponomarev, A., Rimba, P., Weber, I.: New kids on the block: an analysis of modern blockchains (2016)Google Scholar
  2. 2.
    Atzei, N., Bartoletti, M., Cimoli, T.: A survey of attacks on ethereum smart contracts (SoK). In: Maffei, M., Ryan, M. (eds.) Principles of Security and Trust, pp. 164–186. Springer, Heidelberg (2017)CrossRefGoogle Scholar
  3. 3.
    Bartoletti, M., Pompianu, L.: An empirical analysis of smart contracts: platforms, applications, and design patterns. In: Lecture Notes in Computer Science, March 2017Google Scholar
  4. 4.
    Bhargavan, K., Delignat-Lavaud, A., Fournet, C., Gollamudi, A., Gonthier, G., Kobeissi, N., Kulatova, N., Rastogi, A., Sibut-Pinote, T., Swamy, N., Zanella-Béguelin, S.: Formal verification of smart contracts: short paper. In: Proceedings of the 2016 ACM Workshop on Programming Languages and Analysis for Security, PLAS 2016, pp. 91–96. ACM, New York (2016)Google Scholar
  5. 5.
    Bistarelli, S., Mercanti, I., Santini, F.: An analysis of non-standard bitcoin transactions. In: Crypto Valley Conference on Blockchain Technology, CVCBT 2018, Zug, Switzerland, 20–22 June 2018, pp. 93–96. IEEE (2018)Google Scholar
  6. 6.
    Bistarelli, S., Mercanti, I., Santini, F.: A suite of tools for the forensic analysis of bitcoin transactions: preliminary report. In: Mencagli, G., Heras, D.B., Cardellini, V., Casalicchio, E., Jeannot, E., Wolf, F., Salis, A., Schifanella, C., Manumachu, R.R., Ricci, L., Beccuti, M., Antonelli, L., Sánchez, J.D.G., Scott, S.L. (eds.) Euro-Par 2018: Parallel Processing Workshops - Euro-Par 2018 International Workshops, Turin, Italy, 27–28 August 2018, Revised Selected Papers. Lecture Notes in Computer Science, vol. 11339, pp. 329–341. Springer (2018)Google Scholar
  7. 7.
    Bistarelli, S., Santini, F.: Go with the-bitcoin-flow, with visual analytics. In: Proceedings of the 12th International Conference on Availability, Reliability and Security, Reggio Calabria, Italy, 29 August–01 September 2017, pp. 38:1–38:6. ACM (2017)Google Scholar
  8. 8.
    Bocek, T., Stiller, B.: Smart contracts – blockchains in the wings, pp. 169–184. Springer, Heidelberg (2018)Google Scholar
  9. 9.
    Delmolino, K., Arnett, M., Kosba, A., Miller, A., Shi, E.: Step by step towards creating a safe smart contract: lessons and insights from a cryptocurrency lab. In: Financial Cryptography and Data Security: FC 2016 International Workshops, BITCOIN, VOTING, and WAHC, vol. 9604, pp. 79–94, February 2016Google Scholar
  10. 10.
    Fenu, G., Marchesi, L., Marchesi, M., Tonelli, R.: The ICO phenomenon and its relationships with ethereum smart contract environment. In: 2018 International Workshop on Blockchain Oriented Software Engineering (IWBOSE), pp. 26–32, March 2018Google Scholar
  11. 11.
    Kiffer, L., Levin, D., Mislove, A.: Analyzing ethereum’s contract topology. In: Proceedings of the Internet Measurement Conference 2018, IMC 2018, Boston, MA, USA, 31 October–02 November 2018, pp. 494–499. ACM (2018)Google Scholar
  12. 12.
    Swan, M.: Blockchain. O’Reilly Media, Newton (2015)Google Scholar
  13. 13.
    Tan, M.: The ethreum block explorer (2018). Accessed 09 Dec 2018
  14. 14.
    Wood, G.: Ethereum: a secure decentralised generalised transaction ledger (2018). Accessed 08 Dec 2018

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  • Stefano Bistarelli
    • 1
  • Gianmarco Mazzante
    • 2
    Email author
  • Matteo Micheletti
    • 2
  • Leonardo Mostarda
    • 2
  • Francesco Tiezzi
    • 2
  1. 1.University of PerugiaPerugiaItaly
  2. 2.University of CamerinoCamerinoItaly

Personalised recommendations