Skip to main content

Analysis of Ethereum Smart Contracts and Opcodes

  • Conference paper
  • First Online:
Book cover Advanced Information Networking and Applications (AINA 2019)

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 169.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 219.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://www.ethereum.org/.

  2. 2.

    https://github.com/ethereum/solidity.

  3. 3.

    https://github.com/ethereum/solidity.

  4. 4.

    https://github.com/ethereum/solc-js.

  5. 5.

    https://etherscan.io/ [13].

  6. 6.

    https://www.etherchain.org/.

  7. 7.

    https://ethplorer.io/.

  8. 8.

    https://blockchair.com/ethereum.

  9. 9.

    https://github.com/GianmarcoMazzante/opcodeSurv.

  10. 10.

    http://etherscan.io/api?module=opcode&action=getopcode.

  11. 11.

    https://github.com/ethereum/EIPs/blob/master/EIPS/eip-211.md.

  12. 12.

    https://github.com/ethereum/EIPs/blob/master/EIPS/eip-141.md.

  13. 13.

    https://github.com/ethereum/EIPs/blob/master/EIPS/eip-140.md.

  14. 14.

    The address will remain but any interaction with it will only waste gas or ether.

References

  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. 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)

    Chapter  Google Scholar 

  3. Bartoletti, M., Pompianu, L.: An empirical analysis of smart contracts: platforms, applications, and design patterns. In: Lecture Notes in Computer Science, March 2017

    Google Scholar 

  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. 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. 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. 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. Bocek, T., Stiller, B.: Smart contracts – blockchains in the wings, pp. 169–184. Springer, Heidelberg (2018)

    Google Scholar 

  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 2016

    Google Scholar 

  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 2018

    Google Scholar 

  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. Swan, M.: Blockchain. O’Reilly Media, Newton (2015)

    Google Scholar 

  13. Tan, M.: The ethreum block explorer (2018). https://etherscan.io. Accessed 09 Dec 2018

  14. Wood, G.: Ethereum: a secure decentralised generalised transaction ledger (2018). https://ethereum.github.io/yellowpaper/paper.pdf. Accessed 08 Dec 2018

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gianmarco Mazzante .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Bistarelli, S., Mazzante, G., Micheletti, M., Mostarda, L., Tiezzi, F. (2020). Analysis of Ethereum Smart Contracts and Opcodes. In: Barolli, L., Takizawa, M., Xhafa, F., Enokido, T. (eds) Advanced Information Networking and Applications. AINA 2019. Advances in Intelligent Systems and Computing, vol 926. Springer, Cham. https://doi.org/10.1007/978-3-030-15032-7_46

Download citation

Publish with us

Policies and ethics